Bomb Carrier Explosion 1.0.0 (olds.ro)
======================================
When the bomb carrier dies with the bomb on him, the bomb goes off where he
falls: an explosion hurts the players around him. The bomb is used up, and
the round goes on.
- Damage is olds_bce_damage (150) at the centre and falls to 0 at
olds_bce_radius (250 units). Walls stop it, as with grenades.
- olds_bce_tonly 1: only Terrorists are hurt by the blast.
- Only a carrier who still holds the bomb when he dies explodes. A bomb
dropped or planted before does nothing.
- The bomb is destroyed with him: it is not dropped, so the Terrorists
have no bomb for the rest of that round.
- The blast is not the bomb's detonation: the round does not end and
nobody wins by it, even inside a bomb site.
- Deaths caused by the blast count as deaths by the world (nobody gets a
frag for them); the kill feed shows the C4 icon.
- The blast uses the stock sprites/fexplo.spr and weapons/c4_explode1.wav;
nothing has to be downloaded. The plugin shows no text and has no
language file.
Requirements
- ReHLDS, ReGameDLL_CS, Metamod-r, ReAPI
- AMX Mod X 1.10.0.5490 or newer, with the fakemeta module (enabled by
default)
Install
1. Compile scripting/olds_carrierblast.sma and copy olds_carrierblast.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 configs/plugins/olds_carrierblast.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.)
3. Add olds_carrierblast.amxx to addons/amxmodx/configs/plugins.ini.
Settings (addons/amxmodx/configs/plugins/olds_carrierblast.cfg)
olds_bce_damage 150 damage at the centre of the blast (0 = the
blast is only shown)
olds_bce_radius 250 radius of the blast, in units
olds_bce_tonly 0 1 = only Terrorists are hurt by the blast
Commands
None.
How it works
ReAPI RG_CBasePlayer_Killed (pre) checks m_bHasC4 on the victim and takes
the weapon_c4 away. Right after the death a TE_EXPLOSION and the
explosion sound are played there, and rg_dmg_radius deals the damage
(RG_CBasePlayer_TakeDamage leaves out the dead carrier and, with
olds_bce_tonly 1, the Counter-Terrorists).
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-0108. Licence: GNU General Public License v3.0 or later
(GPL-3.0-or-later).