Delayed Command Scheduler 1.0.0 (olds.ro)
=========================================
Lets an admin run a server command later, once or several times, and see
or cancel what is still waiting. Handy for announcements, a restart warning
or a setting that should change in a few minutes.
Requirements
- AMX Mod X 1.10 or newer (no extra modules, ReAPI is not needed)
- Written for AMX Mod X 1.10.0.5490, ReHLDS 3.15.0.896, ReGameDLL_CS 5.30.0.814
Install
1. Compile scripting/olds_timers.sma with amxxpc 1.10 and copy
olds_timers.amxx to addons/amxmodx/plugins/.
2. Copy data/lang/olds_timers.txt to addons/amxmodx/data/lang/.
3. Copy configs/plugins/olds_timers.cfg to addons/amxmodx/configs/plugins/
(if you skip this, the plugin writes the same file with the default on
its first start).
4. Add olds_timers.amxx to addons/amxmodx/configs/plugins.ini.
Commands (admins with the ADMIN_RCON flag "l", and the server console)
amx_delay <seconds> <command>
runs the command once, after the given seconds
example: amx_delay 60 say The server restarts in one minute
amx_repeat <seconds> <times> <command>
runs it <times> times: the first time after <seconds>, then every
<seconds>
example: amx_repeat 300 5 say Visit olds.ro
amx_timers
lists the waiting timers: id, time left, runs left, spacing, command
amx_timercancel <id>
cancels a waiting timer (amx_timercancel 3 or amx_timercancel #3)
- Seconds: 0.1 to 86400, decimals allowed. Times: 1 to 1000.
- The command runs as a server console command. Put it in quotes to run
several commands separated by ; with one timer:
amx_delay 30 "say Round of knives; mp_freezetime 0"
- Every timer gets an id (#1, #2, ...). Adding and cancelling a timer is
written to the AMX Mod X log with the admin's name; every run prints
"[olds_timers] Timer #N runs: <command>" to the server console.
- Timers do not survive a map change.
- The access flag can be changed in addons/amxmodx/configs/cmdaccess.ini.
Settings (addons/amxmodx/configs/plugins/olds_timers.cfg)
olds_timer_max 20 most timers that can wait at the same time (1-64);
a new one beyond that is refused
Texts are in data/lang/olds_timers.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-1557.
Licence: GNU GPL version 3 or later (GPL-3.0-or-later).