10 hours ago10 hr Administrator Fixes the rare bug in which a player stays alive with zero or negative health by detecting it and forcing the death through the normal kill path. 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, ReAPIAMX 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 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.Copy data/lang/olds_zerohp.txt to addons/amxmodx/data/lang/.Copy configs/plugins/olds_zerohp.cfg to addons/amxmodx/configs/plugins/ (if it is missing, the plugin writes it with the default values).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). InstallDownload the ZIP above and copy its folders into cstrike/. Compile the .sma in addons/amxmodx/scripting with the AMX Mod X 1.10 compiler, put the .amxx in addons/amxmodx/plugins, and add it to plugins.ini. Files: addons/amxmodx/scripting/olds_zerohp.sma, test/olds_zerohp_test.sma Idea: olds.ro workshop library · Plugin: alexit · Tested automatically (compiled on AMX Mod X 1.8.2, 1.9 and 1.10, played on a CS 1.6 test server)License: GPL-3.0-or-later. Written for the olds.ro plugin workshop (LIB-2045). Zero HP Bug Fixv1.0.0Counter-Strike 1.6PluginNot tested yetAMX Mod X 1.10Server engine ReHLDSNeeds ReAPI YesMetamod Metamod-R0 downloads6.1 KBUpdated 10 hours agoSign in to downloadolds_zerohp.smaPawn (AMX Mod X) · 353 lines4 files/* * Zero HP Bug Fix (olds.ro workshop card LIB-2045) * * 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 HUD of the original game * 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 playerShow all 353 linesChangelogVersions (1)Install into: cstrike/Open the full page →
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.