Custom Gravity Control 1.0.0 (olds.ro)
======================================
Lets an admin change the gravity of everyone, one team or one player, and
lets players switch low gravity on and off for themselves with /lowgrav.
Every value is kept inside a range the server sets.
Gravity is a multiplier: 1.0 = normal, 0.5 = half (players jump about twice
as high and fall slower), 2.0 = double.
Requirements
- AMX Mod X 1.10 or newer with the fun module (enabled by default)
- ReAPI (ReGameDLL_CS) for the respawn and round restart hooks
- Written for AMX Mod X 1.10.0.5490, ReAPI 5.29.0.358, ReHLDS 3.15.0.896,
ReGameDLL_CS 5.30.0.814
Install
1. Compile scripting/olds_gravity.sma with amxxpc 1.10 (with the ReAPI
include files) and copy olds_gravity.amxx to addons/amxmodx/plugins/.
2. Copy data/lang/olds_gravity.txt to addons/amxmodx/data/lang/.
3. Copy configs/plugins/olds_gravity.cfg to addons/amxmodx/configs/plugins/
(if you skip this, the plugin writes the same file with the defaults on
its first start).
4. Add olds_gravity.amxx to addons/amxmodx/configs/plugins.ini.
Admin command (flag "m", ADMIN_LEVEL_A, and the server console)
amx_gravity <target> <value>
target @all, @t (Terrorists), @ct (Counter-Terrorists), a player's
name or part of it, or #userid
value a number such as 0.5; outside olds_grav_min - olds_grav_max it
is clamped, and the admin's console says so
Examples
amx_gravity @all 0.5
amx_gravity @ct 0.8
amx_gravity #12 1
- The admin's console says which value was set and for how many players.
- Every change is written to the AMX Mod X log with the admin's name.
- Admins without the flag are refused and nothing changes.
- The access flag can be changed in addons/amxmodx/configs/cmdaccess.ini.
Player command (say or say_team), when olds_grav_player is 1
/lowgrav low gravity (olds_grav_low) on; type it again for normal gravity.
Only that player's gravity changes.
Server command
olds_grav_status prints every player's gravity now and the value the
plugin keeps for them
How long a gravity stays
- A player's gravity is set again after every respawn.
- With olds_grav_persist 1 it stays over round restarts and new rounds;
with 0 every player is back to normal gravity at each round restart.
- Players who join start with normal gravity; a map change resets everyone.
- The plugin changes only each player's own gravity, never sv_gravity.
Settings (addons/amxmodx/configs/plugins/olds_gravity.cfg)
olds_grav_min 0.2 lowest gravity allowed
olds_grav_max 2.0 highest gravity allowed
olds_grav_player 1 1 = players may use /lowgrav, 0 = only admins
olds_grav_low 0.5 gravity that /lowgrav gives
olds_grav_persist 1 1 = keep over round restarts, 0 = back to normal
Texts are in data/lang/olds_gravity.txt (English). Add a section such as [ro]
to translate them. No sounds, models or sprites are used.
Credits and licence
Written from scratch by alexit (olds.ro workshop) for workshop card LIB-1523.
Licence: GNU GPL version 3 or later (GPL-3.0-or-later).