Dusk Rehearsal 1.0.0 (olds.ro)
==============================
Practice: an admin darkens the map with a lighting preset for the rest of the
round, to rehearse it at dusk or at night. The map's own lighting comes back
at round end, when the admin cancels, and when the plugin is paused or the
map changes.
Requirements
- ReHLDS, ReGameDLL_CS, Metamod-r, ReAPI
- AMX Mod X 1.10.0.5490 or newer (engine and fakemeta modules)
Install
1. Compile scripting/olds_dusk.sma and copy olds_dusk.amxx to
addons/amxmodx/plugins/. The compiler needs ReAPI's include files.
2. Copy data/lang/olds_dusk.txt to addons/amxmodx/data/lang/.
3. Copy configs/olds_dusk.ini to addons/amxmodx/configs/.
Use (ADMIN_MAP)
amx_dusk <preset> switch to a preset for this round only
amx_dusk off cancel and restore the map's lighting
amx_dusk list the presets, the map's lighting and what is active
Settings (addons/amxmodx/configs/plugins/olds_dusk.cfg, created on first run)
olds_dusk_enable 1 0 turns amx_dusk off and restores the lighting at once
Presets: configs/olds_dusk.ini, one per line "name pattern". The name is
letters, digits, '-' or '_' (up to 15); the pattern is letters a (darkest) to
z (brightest), up to 32 (more than one letter cycles). Shipped: dusk, night,
storm.
Details
- The map's own lighting is lightstyle 0 as the map sets it while loading,
caught with the EngFunc_LightStyle forward in plugin_precache. If it was
not seen, every preset is refused on that map.
- Presets use set_lights() from the engine module; restoring calls
set_lights("#OFF"), which sends the map's own pattern again.
- Restored at round end (also when another plugin ends the round with
rg_round_end; checked every second), at round restart, on amx_dusk off,
on olds_dusk_enable 0, when the plugin is paused and at map change.
- A preset can only be started while a round is running.
No downloads: lightstyles are strings the server sends.