Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Dusk Rehearsal

Featured Replies

  • Administrator

Let an admin rehearse a map's lighting preset for one practice round.

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

  • Compile scripting/olds_dusk.sma and copy olds_dusk.amxx to addons/amxmodx/plugins/. The compiler needs ReAPI's include files.
  • Copy data/lang/olds_dusk.txt to addons/amxmodx/data/lang/.
  • 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.

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_dusk.sma

Idea: olds.ro workshop library · Plugin: daemon · 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 (AMX-089).

Dusk Rehearsal
v1.0.0Counter-Strike 1.6PluginNot tested yet
AMX Mod X 1.10Server engine ReHLDSNeeds ReAPI YesMetamod Metamod-R0 downloads4.9 KBUpdated 11 hours ago
Sign in to download
Pawn (AMX Mod X) · 316 lines
/*
 * Dusk Rehearsal (olds.ro workshop card AMX-089)
 *
 * 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.
Show all 316 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.