Multi-Jump Ability 1.0.0 (olds.ro)
==================================
Extra jumps in the air, for every player (or players with a flag) or as a
RuneMod ability handed out by a rune core. Each extra jump is a little lower
than the one before.
Requirements
- AMX Mod X 1.10.0.5490 or newer (fakemeta, hamsandwich)
Install
1. Compile scripting/olds_multijump.sma and copy olds_multijump.amxx to
addons/amxmodx/plugins/ (list it before a rune core that uses it).
2. Copy data/lang/olds_multijump.txt to addons/amxmodx/data/lang/.
3. A rune core includes scripting/include/olds_multijump.inc.
No downloads: the air jump plays the stock player/pl_jump2.wav.
Settings (addons/amxmodx/configs/plugins/olds_multijump.cfg, made on first run)
olds_mj_max 2 extra jumps per airtime (0-10)
olds_mj_height 268 upward speed of the first extra jump (50-1000)
olds_mj_decay 0.9 each further extra jump has this share of the one
before (0.1-1.0): 268, 241, 217, ...
olds_mj_flag "" admin flag(s) needed; empty means every player. For a
pure rune server set olds_mj_max 0 and let the core
hand out jumps with olds_mj_give.
How it works
- FM_PlayerPreThink: a fresh press (IN_JUMP in pev_button but not in
pev_oldbuttons) while in the air spends one extra jump and sets the
vertical part of pev_velocity. Holding the key spends only one.
- Standing on the ground, on a ladder or deep in water resets the
counter, so a jump off a ladder gets the extra jumps too. The upward kick
also clears the fall speed, so no fall damage is carried over.
Natives (library "olds_multijump", include/olds_multijump.inc)
olds_mj_give(id, jumps) rune mode: the player gets "jumps" (0-10) extra
jumps until death; -1 returns to the cvar rule
olds_mj_get(id) extra jumps the player has now
Admin (ADMIN_SLAY)
amx_multijump <player> shows extra jumps, used this airtime, rune value
and the number of extra jumps made