Buddy Shield 1.0.0 (olds.ro)
============================
Two humans agree to share one infection block. The first zombie bite on
either of them is stopped, and the pair is used up: the next bite on either
partner infects as usual.
Requirements
- AMX Mod X 1.10.0.5490 or newer
- Zombie Plague 5.0 (zp50_core, zp50_gamemodes; zp50_ammopacks only when
olds_buddyshield_cost is above 0)
Install
1. Compile scripting/olds_buddyshield.sma and copy olds_buddyshield.amxx
to addons/amxmodx/plugins/, listed after the ZP 5.0 plugins.
2. Copy data/lang/olds_buddyshield.txt to addons/amxmodx/data/lang/.
No downloads: the block plays the stock items/gunpickup2.wav and shows a
DHUD line.
Settings (addons/amxmodx/configs/plugins/olds_buddyshield.cfg, made on first run)
olds_buddyshield_cost 0 ammo packs the inviter pays when the partner
accepts (0 = free)
Players
say /shield <name> invites that living human; they get a menu (Accept /
Decline, 20 seconds). A zombie, a dead player or
somebody already paired is refused.
How it works
- zp_fw_core_infect_pre: when a zombie player attacks a paired human, the
plugin returns ZP_PLUGIN_HANDLED, so ZP cancels that infection. The
pair is cleared in the same call, so the charge is used exactly once.
Infections that are not a zombie's attack (the mode picking its first
zombies) are never blocked.
- The pair is also cleared when a partner changes role
(zp_fw_core_infect_post, zp_fw_core_cure_post), disconnects, when a
special mode starts (any mode whose name does not contain "Infection"),
and at the end of the round (zp_fw_gamemodes_end).
- With a cost, the inviter must have the packs when inviting and when the
partner accepts; they are taken only when the pair forms.
Admin (ADMIN_KICK)
amx_buddyshield lists the pairs and the bites blocked this map