Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Daily Config Loader

Featured Replies

  • Administrator

Loads a different server config depending on the weekday, so weekends can have other rules, maps or cvars than weekdays.

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

  • Compile scripting/olds_dailycfg.sma with amxxpc 1.10 and copy olds_dailycfg.amxx to addons/amxmodx/plugins/.
  • Copy data/lang/olds_dailycfg.txt to addons/amxmodx/data/lang/.
  • 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).
  • 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).
  • 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).

Install

Download the ZIP above and copy its folders into cstrike/. Compile the .sma in addons/amxmodx/scripting with the AMX Mod X 1.10 compiler, put the .amxx in addons/amxmodx/plugins, and add it to plugins.ini.

Files: addons/amxmodx/scripting/olds_dailycfg.sma, test/olds_dailycfg_test.sma

Idea: olds.ro workshop library · Plugin: alexit · Tested automatically (compiled on AMX Mod X 1.8.2, 1.9 and 1.10, played on a CS 1.6 test server)
License: GPL-3.0-or-later. Written for the olds.ro plugin workshop (LIB-1534).

Daily Config Loader
v1.0Counter-Strike 1.6PluginNot tested yet
AMX Mod X 1.10Server engine HLDS, ReHLDSNeeds ReAPI NoMetamod Metamod-R0 downloads8.2 KBUpdated 11 hours ago
Sign in to download
Pawn (AMX Mod X) · 262 lines
/*
 * Daily Config Loader (olds.ro workshop card LIB-1534)
 *
 * Executes a different config file for each day of the week, so weekends
 * can have other rules or settings than weekdays:
 *   addons/amxmodx/configs/daily/mon.cfg, tue.cfg, wed.cfg, thu.cfg,
 *   fri.cfg, sat.cfg, sun.cfg
Show all 262 lines

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.