addonsVersion 1.0: First release.
README.txtVersion 1.0: First release.
README.txt3 KB
No file matches.
Daily Config Loader 1.0.0 (olds.ro)
===================================
Runs a different config file for each day of the week, so weekends can have
other rules, settings or time limits than weekdays. The day comes from the
server clock.
Requirements
- AMX Mod X 1.10 or newer (no extra modules, ReAPI is not needed)
- Tested on AMX Mod X 1.10.0.5490, ReHLDS 3.15.0.896, ReGameDLL_CS 5.30.0.814
Install
1. Compile scripting/olds_dailycfg.sma with amxxpc 1.10 and copy
olds_dailycfg.amxx to addons/amxmodx/plugins/.
2. Copy data/lang/olds_dailycfg.txt to addons/amxmodx/data/lang/.
3. Copy configs/plugins/olds_dailycfg.cfg to addons/amxmodx/configs/plugins/
(if you skip this, the plugin writes the same file with the default on
its first start).
4. Copy the configs/daily folder to addons/amxmodx/configs/daily/ and put
each day's settings in mon.cfg, tue.cfg, wed.cfg, thu.cfg, fri.cfg,
sat.cfg and sun.cfg (they only hold comments at first).
5. Add olds_dailycfg.amxx to addons/amxmodx/configs/plugins.ini.
When a day file runs
- On the first map after the server starts: always.
- With olds_daily_recheck 1 (the default) also:
* on every map change, because server.cfg runs again on each map and
would undo the day's settings;
* after midnight: the server clock is checked once a minute and the
new day's file runs as soon as the day changes.
- The file runs after server.cfg and amxx.cfg, so its settings win over
theirs. Per-map configs (addons/amxmodx/configs/maps/<map>.cfg) run after
it and can still change a setting for one map.
- A missing file is skipped and the server runs normally. One line in the
AMX Mod X log says so, for example:
No daily config for Monday: addons/amxmodx/configs/daily/mon.cfg does
not exist, nothing was executed.
The same missing file is not logged again on later maps.
- The first run of each day is logged:
Executed the daily config for Saturday: addons/amxmodx/configs/daily/sat.cfg
Settings (addons/amxmodx/configs/plugins/olds_dailycfg.cfg)
olds_daily_recheck 1 1 = run the day's file again on every map change and
switch to the next day's file at midnight
0 = run it only on the first map after the server
starts
Admin command (flag "h", ADMIN_CFG; also from the server console)
amx_dailycfg shows today's day, its file (found or missing), the
file that ran on this map and the re-check setting
amx_dailycfg apply executes today's file now, for example after you
edited it
The access flag can be changed in addons/amxmodx/configs/cmdaccess.ini.
Texts are in data/lang/olds_dailycfg.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-1534.
Licence: GNU GPL version 3 or later (GPL-3.0-or-later).