Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Flash Dark Mode

Featured Replies

  • Administrator

Players sensitive to bright flashes can switch flashbang blindness from a white screen to a black one. The blind time and strength stay exactly the same, so the option gives comfort and no advantage.

Flash Dark Mode 1.0.0 (olds.ro)

An accessibility option for players who are sensitive to bright flashes. A player who types /darkflash sees flashbang blindness as a black screen instead of a white one. Only the colour changes: the blind time, the hold time and the strength stay exactly what the game sent, so a partial flash from the side is just as partial and a full flash lasts just as long. The option gives comfort and no advantage. The choice is saved by SteamID.

Requirements

  • ReHLDS, ReGameDLL_CS, Metamod-r and ReAPI (with RegisterMessage)
  • AMX Mod X 1.10 or newer with the nvault module (it ships with AMX Mod X)
  • Tested on ReHLDS 3.15, ReGameDLL_CS 5.30.0.814, ReAPI 5.29.0.358 and AMX Mod X 1.10.0.5490

Install

  • Compile scripting/olds_darkflash.sma with amxxpc 1.10 and copy olds_darkflash.amxx to addons/amxmodx/plugins/. The compiler needs ReAPI's include files (reapi.inc and reapi_*.inc) in addons/amxmodx/scripting/include/.
  • Copy data/lang/olds_darkflash.txt to addons/amxmodx/data/lang/.
  • Copy configs/plugins/olds_darkflash.cfg to addons/amxmodx/configs/plugins/.
  • Add olds_darkflash.amxx to addons/amxmodx/configs/plugins.ini.

How it works

  • A flashbang blinds a player with a white screen fade (colour 255 255 255). For a player with the option on, the plugin rewrites that colour to black (0 0 0) and leaves the fade's duration, hold time, flags and alpha untouched.
  • The game sends the same fade to every spectator watching the flashed player in first person, one message per spectator. Each receiver gets their own colour: a spectator with the option on sees black even when the flashed player has it off, and the other way round.
  • White fades from other plugins (for example "flash" effects) turn black in the same way, also when a plugin sends one fade to everyone: then each player gets a copy in their own colour. Fades in any other colour are left alone.
  • The choice is saved in the nvault file olds_darkflash by SteamID and comes back when the player joins again. Players without a unique SteamID (STEAM_ID_LAN, bots) keep it until they leave.

Settings (addons/amxmodx/configs/plugins/olds_darkflash.cfg)

  olds_darkflash_enable    1    1 = on, 0 = off (fades are left alone)
  olds_darkflash_default   0    1 = the option is on for players who never
                                typed /darkflash, 0 = off
  olds_darkflash_announce  300  seconds between chat hints about /darkflash,
                                sent to the players who have it off; 0 = no
                                hints

Commands

  say /darkflash         (also say_team) turns the option on or off
  olds_darkflash_status  (server console) the settings, then for each player
                         the choice, how many white fades were turned black
                         and the exact fade time, hold time and alpha of their
                         last flash (from ReAPI's PlayerBlind hook)

Files Texts are in data/lang/olds_darkflash.txt (English). Nothing is downloaded by players: the plugin only changes the colour of the engine's own screen fade.

Credits and licence Written from scratch by alexit (olds.ro workshop) for workshop card IDEA-FA3831F0BCBA17F4. Licence: 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_darkflash.sma, test/olds_darkflash_test.sma

Idea: alexit · 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 (IDEA-FA3831F0BCBA17F4).

Flash Dark Mode
v1.0.0Counter-Strike 1.6PluginNot tested yet
AMX Mod X 1.10Server engine ReHLDSNeeds ReAPI YesMetamod Metamod-R0 downloads6.9 KBUpdated 10 hours ago
Sign in to download
Pawn (AMX Mod X) · 465 lines
/*
 * Flash Dark Mode (olds.ro workshop card IDEA-FA3831F0BCBA17F4)
 *
 * Players who are sensitive to bright flashes can switch flashbang blindness
 * from a white screen to a black one. Only the colour changes: the blind
 * time, the hold time and the strength (alpha) stay exactly as the game sent
 * them, so the option gives comfort and no advantage.
Show all 465 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.