Weapon Fire Rate Control 1.0.0 (olds.ro)
========================================
Makes each class of weapons fire slower or faster. After every shot the time
until the next shot is multiplied by the class's value: 2.0 means twice the
stock gap between shots (half the rate), 0.5 half the gap (double the rate).
The knife and the grenades are never changed.
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_firerate.sma and copy olds_firerate.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_firerate.txt to addons/amxmodx/data/lang/.
3. Copy configs/plugins/olds_firerate.cfg to addons/amxmodx/configs/plugins/
(if it is missing, the plugin writes it with the default values).
4. Add olds_firerate.amxx to addons/amxmodx/configs/plugins.ini.
Commands
amx_rof_reload Admins with the cvar flag (g, ADMIN_CVAR): runs
configs/plugins/olds_firerate.cfg again and prints the
values in use. Each use is written to the AMX Mod X log.
How it works
- Every primary attack of a gun passes Ham_Weapon_PrimaryAttack. When it
really fired (the clip went down), the weapon's next-attack time is
multiplied by the value of its class. A click on an empty clip keeps the
stock timing.
- The Glock-18 sets both of its attack timers after a shot, so both are
scaled, and its burst mode waits the same scaled time.
- The cvars are read at every shot: a change works from the next shot,
without a map change. Values outside 0.2 - 3.0 are clamped to that range.
- Each weapon keeps its own timer, so a slowed AWP does not slow the knife
or any other weapon the player switches to.
- Players with weapon prediction on (cl_lw 1, the default) may see their
own firing animation run at the stock rate when a class is slowed; the
shots themselves come only at the scaled rate.
Settings (addons/amxmodx/configs/plugins/olds_firerate.cfg)
olds_rof_pistol 1.0 P228, Glock-18, USP, Desert Eagle, Five-SeveN, Elites
olds_rof_rifle 1.0 FAMAS, Galil, AK-47, M4A1, SG 552, AUG, M249, and the
shotguns M3 and XM1014
olds_rof_sniper 1.0 Scout, AWP, G3SG1, SG 550
olds_rof_smg 1.0 MAC-10, TMP, MP5, UMP45, P90
Each value: time between shots x value, 0.2 - 3.0 (1.0 = stock).
No sounds, models or sprites are added.
Credits and licence
Written from scratch by alexit (olds.ro workshop) for workshop card LIB-2032.
Licence: GNU GPL version 3 or later (GPL-3.0-or-later).