CT Safe Buttons 1.0.0 (olds.ro) - Deathrun
==========================================
Counter-terrorists (the runners) cannot set off trap buttons: pressing one
(+use) or shooting a shootable one does nothing for them, with a chat line and
the stock click sound/buttons/button10.wav. The terrorist (the trap master)
uses them as normal. Buttons fired by other entities (relays, triggers) are
not touched. Buttons listed in configs/olds_ctsafe.ini work for everyone on
that map (doors to the end, teleports, secret rooms...).
Requirements
- AMX Mod X 1.10.0.5490 or newer, with ReAPI (ReGameDLL_CS);
fakemeta, hamsandwich
Install
1. Compile scripting/olds_ctsafe.sma and copy olds_ctsafe.amxx to
addons/amxmodx/plugins/.
2. Copy configs/olds_ctsafe.ini to addons/amxmodx/configs/ and
data/lang/olds_ctsafe.txt to addons/amxmodx/data/lang/.
No downloads.
Settings (addons/amxmodx/configs/plugins/olds_ctsafe.cfg, made on first run)
olds_ctsafe_enable 1 CTs cannot use trap buttons
olds_ctsafe_msg 1 the chat line and click for the CT
olds_ctsafe_classes "func_button,func_rot_button"
button classes guarded, read at map start; the
plugin knows func_button, func_rot_button,
momentary_rot_button and button_target
olds_ctsafe.ini
"<map> <button>" per line: the button's targetname, or its brush model
(*12); the map * means every map.
How it works
- Ham_Use on the button classes: when the activator is a CT player the use
is superseded, so the button neither moves nor fires its target.
- Ham_TraceAttack and Ham_TakeDamage on the same classes: a CT's shot is
superseded, so a shootable button is not triggered.
- The chat line is sent at most every 1.5 s per player.