Health Regeneration 1.0.0 (olds.ro)
===================================
Living players slowly get their health back over time, faster while they
stand in their own buy zone. Taking damage pauses the regeneration for a few
seconds, so it never helps in the middle of a fight. Health is never raised
above a set maximum, and a player who already has more (from another plugin)
is never lowered.
- Every olds_regen_tick seconds a living player gets olds_regen_hp health,
or olds_regen_buyzone_hp instead while standing in their own buy zone.
- After any damage that was really taken (shots, grenades, falls) nothing
is added for olds_regen_delay seconds. Damage the game refuses, such as
friendly fire with mp_friendlyfire 0, does not pause it.
- Each spawn starts a fresh regeneration: the first step comes one tick
after the spawn. A dead player never regenerates.
- It can be limited to one team and/or to players with access flags.
- The regeneration is silent: no sound, no chat or HUD message, only the
health number changes. That is why the plugin has no language file.
Requirements
- ReHLDS, ReGameDLL_CS, Metamod-r, ReAPI
- AMX Mod X 1.10.0.5490 or newer, with the cstrike module (enabled by default)
Install
1. Compile scripting/olds_healthregen.sma and copy olds_healthregen.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_healthregen.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_healthregen.amxx to addons/amxmodx/configs/plugins.ini.
Settings (addons/amxmodx/configs/plugins/olds_healthregen.cfg)
olds_regen_tick 1.0 seconds between two steps (0.1 - 60); a new value
applies from the next step
olds_regen_hp 2 health added per step (0 - 100, 0 = none)
olds_regen_buyzone_hp 6 health added per step inside the player's own buy
zone, instead of olds_regen_hp (0 - 100, 0 = none)
olds_regen_delay 5.0 seconds without damage before it starts again (0 - 60)
olds_regen_max 100 health is never raised above this (1 - 255)
olds_regen_team 0 0 both teams, 1 Terrorists only, 2 Counter-Terrorists only
olds_regen_flag "" access flags needed, for example "b" or "bt" (any
one of them is enough); empty = every player
Commands
None.
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, with YaPB bots.
No sounds, models or sprites are added.
Credits and licence
Written from scratch by alexit (olds.ro workshop) for workshop card
LIB-0369. Licence: GNU General Public License v3.0 or later
(GPL-3.0-or-later).