Juggernaut Armor Plates 1.0.0 (olds.ro) - Juggernaut add-on
===========================================================
The juggernaut's protection is split into three plates, each with its own
durability:
head hits on the head
chest hits on the chest, stomach and arms
legs hits on the legs
While a plate holds, a hit on its zone does olds_plate_reduce percent less
damage and the plate loses what it stopped (a plate with less left stops only
what it has left). When a plate reaches 0 it breaks: every player reads
"Head plate destroyed" (or Chest / Leg), the stock sound debris/metal3.wav
plays at the juggernaut, and that zone takes full damage from then on.
HE grenades (blast damage) hit no zone: what the plates stop is split evenly
across the plates still standing. Falls and other damage are not touched.
Hunters aiming at the juggernaut see the plate values on the HUD
("Plates - Head 230 | Chest 800 | Legs 500"), broken plates as 0.
Plates start again at every round restart and when the juggernaut changes.
Who is the juggernaut
A Juggernaut core calls olds_plates_set_juggernaut(id) (see
scripting/include/olds_plates.inc); without one, the plugin takes the only
player on the terrorist team while counter-terrorists play (the layout of
the olds.ro Juggernaut Mode).
Requirements
- AMX Mod X 1.10.0.5490 or newer, with ReAPI (ReGameDLL_CS); fakemeta
Install
1. Compile scripting/olds_plates.sma and copy olds_plates.amxx to
addons/amxmodx/plugins/ (after the Juggernaut core in plugins.ini).
2. Copy data/lang/olds_plates.txt to addons/amxmodx/data/lang/.
No downloads: the sound is a stock one.
Settings (addons/amxmodx/configs/plugins/olds_plates.cfg, made on first run)
olds_plate_head 300 head plate durability
olds_plate_chest 800 chest plate durability
olds_plate_legs 500 leg plate durability
olds_plate_reduce 70 percent of a hit a standing plate stops
The durabilities are read when the plates are reset (round restart, new
juggernaut).
Command
amx_plates (ADMIN_KICK) prints the juggernaut's plates to the console
How it works
RG_CBasePlayer_TraceAttack reads the hit's hitgroup; RG_CBasePlayer_TakeDamage
(pre) lowers the damage with SetHookChainArg while the zone's plate holds.
The game's own hitgroup multipliers (head x4 and so on) come first, so the
plate stops part of the multiplied damage. Armour still works as usual
after the plates.