addonsVersion 1.0.0: First release.
README.txtVersion 1.0.0: First release.
README.txt2.4 KB
No file matches.
Fumble on Heavy Hit 1.0.0 (olds.ro)
===================================
American Football add-on. When the ball carrier takes one heavy hit he fumbles:
the ball pops loose in a random direction, and for a moment neither the fumbler
nor the hitter can pick it up, so a third player decides the play.
Requirements
- AMX Mod X 1.10.0.5490 or newer, with ReAPI (ReGameDLL_CS)
- the American Football core (library "olds_afootball"), with the natives
and the forward below; without it the plugin loads and stays idle
Install
1. Compile scripting/olds_fumble.sma (scripting/include/olds_afootball.inc
next to it) and copy olds_fumble.amxx to addons/amxmodx/plugins/.
2. Copy data/lang/olds_fumble.txt to addons/amxmodx/data/lang/.
No downloads: chat and HUD text; the cue is the stock
sound/common/bodydrop3.wav. The ball model belongs to the core.
Settings (addons/amxmodx/configs/plugins/olds_fumble.cfg, made on first run)
olds_fumble_damage 40 damage of one hit that makes the carrier fumble
olds_fumble_speed 250 horizontal speed given to the loose ball
olds_fumble_lock 1.5 seconds the fumbler and the hitter cannot pick it up
olds_fumble_chance 100 chance in percent that a heavy hit fumbles
Players
say /fumbles forced fumbles of this map, most first, per hitter
What the core provides (include/olds_afootball.inc)
olds_af_get_carrier() the carrier, 0 = nobody
olds_af_get_ball() the ball entity
olds_af_drop_ball() drops the ball where the carrier stands and
returns it (the plugin then sets its velocity)
forward olds_af_ball_pickup(id, ball) asked before a pick-up (ET_STOP);
PLUGIN_HANDLED refuses it
How it works
- RG_CBasePlayer_TakeDamage (post): the victim is the carrier, still alive,
the damage of this one hit is at least olds_fumble_damage, and the
attacker is another player.
- A hit that kills the carrier is not a fumble: the core drops the ball at
the body as it always does, and nothing is counted.
- The ball gets a random horizontal direction at olds_fumble_speed and a
small hop upward (on flat ground it lands about 150 units away).
- Forced fumbles are counted per hitter (by SteamID; bots and LAN ids by
name) for the whole map. The pick-up locks are cleared on each round
restart (RG_CSGameRules_RestartRound).