addonsVersion 1.0.0: First release.
README.txtVersion 1.0.0: First release.
README.txt2.7 KB
No file matches.
Underwater Shooting Control 1.0.0 (olds.ro)
===========================================
Guns do not work under water. A player whose head is under water (or who is
in the water up to the level you choose) cannot fire, or use the secondary
attack (scope, silencer, burst mode), of any weapon that is not on the allow
list. By default the knife, the USP and the Glock-18 still work, so water
becomes a safe spot or a knife fight.
Requirements
- ReHLDS, ReGameDLL_CS, Metamod-R, ReAPI
- AMX Mod X 1.10 or newer (written for 1.10.0.5490), with the hamsandwich
module (part of every AMX Mod X install)
Install
1. Compile scripting/olds_uwshoot.sma and copy olds_uwshoot.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_uwshoot.txt to addons/amxmodx/data/lang/.
3. Copy configs/plugins/olds_uwshoot.cfg to addons/amxmodx/configs/plugins/
(if it is missing, the plugin writes it with the default values).
4. Add olds_uwshoot.amxx to addons/amxmodx/configs/plugins.ini.
Commands
None.
How it works
- While a player is in water at olds_uw_level or deeper, the attack timers
of a blocked weapon in his hands are held back every frame, so the gun
neither fires on the server nor shows a shot or muzzle flash through the
client's weapon prediction. Ham_Weapon_PrimaryAttack and
Ham_Weapon_SecondaryAttack are blocked too, in case anything else calls
them.
- A player who presses fire under water gets a short message in the
middle of the screen (at most once every 2 seconds) with olds_uw_msg 1.
- Grenades follow olds_uw_nades, not the allow list. The C4 is never
blocked.
- Water levels: 1 = feet in the water, 2 = waist deep, 3 = head under
water. With the default 3, a player wading waist deep can still shoot.
- Changes to the cvars work at once, also olds_uw_allow; a name on that
list that is not a weapon is reported in the server console.
Settings (addons/amxmodx/configs/plugins/olds_uwshoot.cfg)
olds_uw_enable 1 1 = on, 0 = every weapon works under water
olds_uw_level 3 water level from which guns are blocked (1 - 3)
olds_uw_allow "knife usp glock18" weapons that still work: names without
"weapon_", separated by spaces
olds_uw_nades 0 1 = grenades cannot be thrown either
olds_uw_msg 1 1 = tell the player why he cannot shoot
No sounds, models or sprites are added.
Credits and licence
Written from scratch by alexit (olds.ro workshop) for workshop card LIB-2003.
Licence: GNU GPL version 3 or later (GPL-3.0-or-later).