addonsVersion 1.0: First release.
README.txtVersion 1.0: First release.
README.txt2.8 KB
No file matches.
Ammo for HP 1.0.0 (olds.ro)
===========================
A player can trade a little health for one magazine of backpack ammo for
the gun in his hands, with a chat command or a key.
- Each trade takes olds_ah_cost health (15) and adds one magazine of the
weapon in hand (30 rounds for an AK-47, 7 for a Desert Eagle, and so
on). When the backpack has room for less than a magazine, it is filled
up.
- Health never drops below 1, and a player with olds_ah_minhp health (20)
or less cannot trade at all.
- At most olds_ah_limit trades (3) per player per round.
- Refused, with a chat line and no health taken: holding the knife, a
grenade or the bomb; a full backpack; too little health; the round's
limit reached; dead.
- The health is taken directly, not as damage, so a trade can never kill.
Each trade is written to the server log as a non-fatal event:
"Name<uid><steamid><TEAM>" triggered "ammo_for_hp" (health "15") (ammo "30")
- Magazine sizes and backpack limits are the game's own (ReGameDLL_CS
weapon info).
Requirements
- ReHLDS, ReGameDLL_CS, Metamod-r, ReAPI
- AMX Mod X 1.10.0.5490 or newer, with the cstrike module (enabled by
default)
Install
1. Compile scripting/olds_ammohp.sma and copy olds_ammohp.amxx to
addons/amxmodx/plugins/. The compiler needs ReAPI's include files
(reapi.inc and the reapi_*.inc files from the ReAPI release, in
addons/amxmodx/scripting/include/) next to the stock AMX Mod X includes.
2. Copy data/lang/olds_ammohp.txt to addons/amxmodx/data/lang/.
3. Copy configs/plugins/olds_ammohp.cfg to
addons/amxmodx/configs/plugins/ and change the values you want.
(If the file is missing, the plugin writes one with the defaults the
first time it starts.)
4. Add olds_ammohp.amxx to addons/amxmodx/configs/plugins.ini.
Settings (addons/amxmodx/configs/plugins/olds_ammohp.cfg)
olds_ah_cost 15 health taken for one magazine (never below 1 HP)
olds_ah_limit 3 trades per player per round (0 = no limit)
olds_ah_minhp 20 a player with this much health or less cannot
trade
Commands
say /ammo, say_team /ammo trade health for one magazine
+ammo the same from a key: bind x +ammo
Chat text
"[Ammo] +30 rounds for 15 HP (health now 85)." and the refusal lines are
in data/lang/olds_ammohp.txt and can be translated there. The sound is
the game's own items/9mmclip1.wav, so nothing is downloaded.
Tested on
ReHLDS 3.15.0.896, ReGameDLL_CS 5.30.0.814, Metamod-r 1.3.0.149,
AMX Mod X 1.10.0-git5490, ReAPI 5.29.0.358.
Credits and licence
Written from scratch by alexit (olds.ro workshop) for workshop card
LIB-0073. Licence: GNU General Public License v3.0 or later
(GPL-3.0-or-later).