Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Buyable Antidote

Featured Replies

  • Administrator

Infected players may buy an antidote with money to turn back into humans once per round.

Buyable Antidote 1.0.0 (olds.ro) - Biohazard add-on

An infected player may buy an antidote with money and turn back into a human:

  say /antidote   costs olds_ad_cost dollars; olds_ad_limit per round; not
                  sooner than olds_ad_delay seconds after the infection.
With olds_ad_firstzombie 0 the first zombies of the round (infected by the
game, without an attacker) cannot buy it.

Requirements

  • AMX Mod X 1.10.0.5490 or newer, with ReAPI (ReGameDLL_CS); cstrike
  • the Biohazard Zombie Core (library "olds_biohazard", include/olds_biohazard.inc, workshop card LIB-0030)

Install

  • Compile scripting/olds_antidote.sma (scripting/include/olds_biohazard.inc next to it) and copy olds_antidote.amxx to addons/amxmodx/plugins/, after the core in plugins.ini.
  • Copy data/lang/olds_antidote.txt to addons/amxmodx/data/lang/. No downloads: the cure plays the stock sound/items/medshot4.wav.

Settings (addons/amxmodx/configs/plugins/olds_antidote.cfg, made on first run)

  olds_ad_cost 5000        price in dollars
  olds_ad_limit 1          antidotes one player may buy per round
  olds_ad_delay 5          seconds after the infection before it can be bought
  olds_ad_firstzombie 1    0 = the first zombies of the round cannot buy it

How it works

  • bh_fw_infected stamps the infection time; an infection without an attacker marks a first zombie.
  • /antidote checks, in order: living zombie, first-zombie rule, round limit, delay, money (the reply says how much is missing). Then the core's bh_cure turns the player back into a human; only if it worked is the money taken (cs_set_user_money), the human model put back (cs_reset_user_model) and the health set to 100.
  • Everything per player is cleared at the round restart (RG_CSGameRules_RestartRound), on death and on disconnect.

Install

Download the ZIP above and copy its folders into cstrike/. Compile the .sma in addons/amxmodx/scripting with the AMX Mod X 1.10 compiler, put the .amxx in addons/amxmodx/plugins, and add it to plugins.ini.

Files: addons/amxmodx/scripting/include/olds_biohazard.inc, addons/amxmodx/scripting/olds_antidote.sma, test/bh_stub.sma

Idea: olds.ro workshop library · Plugin: daemon · Tested automatically (compiled on AMX Mod X 1.8.2, 1.9 and 1.10, played on a CS 1.6 test server)
License: GPL-3.0-or-later. Written for the olds.ro plugin workshop (LIB-0031).

Buyable Antidote
v1.0.0Counter-Strike 1.6PluginNot tested yet
AMX Mod X 1.10Server engine ReHLDSNeeds ReAPI YesMetamod Metamod-R0 downloads4.6 KBUpdated 3 hours ago
Sign in to download
Pawn (AMX Mod X) · 168 lines
/*
 * Buyable Antidote (olds.ro workshop card LIB-0031) - Biohazard add-on
 *
 * An infected player may buy an antidote with money and turn back into a human:
 * say /antidote, olds_ad_cost dollars, olds_ad_limit times per round, not sooner than
 * olds_ad_delay seconds after the infection. With olds_ad_firstzombie 0 the first
 * zombies of the round (infected by the game, without an attacker) cannot buy it.
Show all 168 lines

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.