addonsVersion 1.0.0: First release.
README.txtVersion 1.0.0: First release.
README.txt3.3 KB
No file matches.
Zero HP Bug Fix 1.0.0 (olds.ro)
===============================
Sometimes a player stays alive with 0 HP or less, for example when a
plugin sets the health to 0 (or to less than 1, which the original game's
HUD shows as 0) without killing the player. This plugin finds such players
and kills them through the game's normal kill path, credited to the last
player who hurt them, so the frag, the kill reward, the kill feed and the
game log are all right.
Requirements
- ReHLDS, ReGameDLL_CS, Metamod-R, ReAPI
- AMX Mod X 1.10 or newer (written and tested on 1.10.0.5490), with the
hamsandwich module (part of every AMX Mod X install)
Install
1. Compile scripting/olds_zerohp.sma and copy olds_zerohp.amxx to
addons/amxmodx/plugins/. The compiler needs ReAPI's include files
(reapi.inc and the reapi_*.inc files from the ReAPI release) next to the
stock AMX Mod X includes.
2. Copy data/lang/olds_zerohp.txt to addons/amxmodx/data/lang/.
3. Copy configs/plugins/olds_zerohp.cfg to addons/amxmodx/configs/plugins/
(if it is missing, the plugin writes it with the default values).
4. Add olds_zerohp.amxx to addons/amxmodx/configs/plugins.ini.
Commands
None.
How it works
- A player is checked right after every hit he takes, and all living
players are checked every 0.5 seconds. A player who is alive for the
game but has less than 1 HP (get_user_health() shows 0 or less) is
killed at once.
- The killer is the player who caused that player's last damage since his
spawn, and the kill feed shows the weapon of that hit (also when the
grenade that did it is gone). Frags, money and the game log work as for
any kill, and other plugins see a normal death.
- With no such player (no damage since the spawn, or the attacker left
the server) the death counts as a death by the world, like a fall:
nobody gets a frag.
- A hit that is lethal anyway is left to the game, so a kill is never
counted twice.
- During freeze time nothing is done; a player found at 0 HP then is
killed when the freeze time ends.
Settings (addons/amxmodx/configs/plugins/olds_zerohp.cfg)
olds_zerohp_fix 1 1 = kill players left alive with 0 HP or less, 0 = off
olds_zerohp_log 1 1 = write one line per fix to
addons/amxmodx/logs/olds_zerohp.log, 0 = no log
The log line names the player, his userid and SteamID, his health, and the
killer with userid, SteamID and weapon (or "no known attacker").
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 bots on de_dust2: a player
set to 0 HP while alive killed within half a second and credited to the
player who hit him last (frag and kill feed); -5 HP with no damage since the
spawn counted as a death by the world, without a frag; an exactly lethal HE
hit left to the game (one kill feed line, one frag); the kill feed still
naming the grenade after the grenade was gone; a death by the world when the
attacker had left the server; nothing done with olds_zerohp_fix 0; a player
at 0 HP during freeze time killed when the freeze time ended; one log line
per fix, and none with olds_zerohp_log 0.
No sounds, models or sprites are added.
Credits and licence
Written from scratch by alexit (olds.ro workshop) for workshop card LIB-2045.
Licence: GNU GPL version 3 or later (GPL-3.0-or-later).