addonsVersion 1.0: First release.
README.txtVersion 1.0: First release.
README.txt3.1 KB
No file matches.
Anti Rapid Pistol Fire 1.0.0 (olds.ro)
======================================
Semi-automatic pistols cannot fire faster than a set interval, which stops
fire macros and scripts from going past it. Shots that come too early are
dropped; after a number of them the player is warned and logged, or kicked.
- Pistols: USP, Glock-18 (semi-automatic mode only; its burst mode keeps
the game's own timing), P228, Desert Eagle, Five-SeveN, Dual Elites.
- A shot less than olds_ap_interval (0.15 s) after the previous shot of
the same weapon is dropped. If the button is still held, it fires as
soon as the interval has passed.
- Only real shots count: holding the fire button fires a pistol once, and
that is not rapid fire. Several early attempts before one shot count as
one dropped shot.
- Each weapon has its own timer, so switching weapons never drops a shot.
- 10 ms are allowed for the server's frame timing, so a player who clicks
exactly at the limit is never punished.
- Every olds_ap_warn (5) dropped shots the player gets a chat warning and
a line goes to the AMX Mod X log. With olds_ap_kick 1 the player is
kicked at the first warning instead.
- The count of dropped shots lasts until the player leaves the server.
Requirements
- ReHLDS, ReGameDLL_CS, Metamod-r, ReAPI
- AMX Mod X 1.10.0.5490 or newer, with the hamsandwich module (enabled by
default)
Install
1. Compile scripting/olds_antirapid.sma and copy olds_antirapid.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 data/lang/olds_antirapid.txt to addons/amxmodx/data/lang/.
3. Copy configs/plugins/olds_antirapid.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.)
4. Add olds_antirapid.amxx to addons/amxmodx/configs/plugins.ini.
Settings (addons/amxmodx/configs/plugins/olds_antirapid.cfg)
olds_ap_interval 0.15 shortest time between two pistol shots (seconds)
olds_ap_warn 5 dropped shots before a warning; warned and
logged again every this many
olds_ap_kick 0 1 = kick the player at the first warning instead
Commands
None.
Texts
Chat warning: "[Anti-Rapid-Fire] Your pistol fires faster than allowed:
5 shots were dropped. Turn off any fire macro or script." Kick reason:
"Pistol fire macro or script (shots faster than allowed)". Both are in
data/lang/olds_antirapid.txt and can be translated there.
Log line (addons/amxmodx/logs): "Name<userid><SteamID>" fired the
weapon_deagle faster than 0.15 s: 5 shots dropped.
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.
Credits and licence
Written from scratch by alexit (olds.ro workshop) for workshop card
LIB-0079. Licence: GNU General Public License v3.0 or later
(GPL-3.0-or-later).