addonsVersion 1.0.0: First release.
README.txtVersion 1.0.0: First release.
README.txt1.6 KB
No file matches.
Headshot-Only Practice 1.0.0 (olds.ro)
======================================
Practice: while on, only headshots between players deal damage, so players
train head-level aim. A body hit does no harm and the shooter sees a short
"Headshots only" hint.
Requirements
- AMX Mod X 1.10.0.5490 or newer, ReAPI
Install
1. Compile scripting/olds_hsonly.sma and copy olds_hsonly.amxx to
addons/amxmodx/plugins/.
2. Copy data/lang/olds_hsonly.txt to addons/amxmodx/data/lang/.
No downloads: the stock headshot and flesh hit sounds still play.
Settings (addons/amxmodx/configs/plugins/olds_hsonly.cfg, made on first run)
olds_hsp_enabled 0 the mode is on
olds_hsp_knife 1 knife hits deal normal damage anywhere
olds_hsp_hint 1 show "Headshots only" to the shooter on a body hit
(centre of the screen, twice a second at most)
olds_hsp_hegrenade 0 1 = HE grenades deal normal damage, 0 = none
Admins
amx_hsonly <0|1> turn it off or on at once (ADMIN_CVAR); without an
argument it shows the settings and how many hits
were blocked
How it works
- RG_CBasePlayer_TakeDamage (pre), when a player hurts another player:
the hit group the game stored for the victim (m_LastHitGroup, offset
75) decides. HIT_HEAD keeps the damage; every other group sets it to 0
with SetHookChainArg(4, ATYPE_FLOAT, 0.0).
- Knife hits (with olds_hsp_knife 1) and HE grenades (with
olds_hsp_hegrenade 1) keep their damage. Falls, map damage and self
damage are never touched.