This is a Counter-Strike Sharp plugin that fixes flashing/pulsing HUD issues commonly seen with surf timer plugins and other HUD message systems in Counter-Strike 2.
The plugin is based on the implementation from the CS2Fixes MetaMod plugin and mimics its HUD flashing fix functionality.
In CS2, HUD messages (like surf timer displays) that use the show_survival_respawn_status game event can flash or pulse unintentionally. This occurs because the game's HUD rendering behavior changes based on the game state.
The plugin manipulates the m_bGameRestart (GameRestart) flag in the game rules to prevent HUD flashing:
- Per-Tick Fix: The plugin uses the
OnTicklistener to set theGameRestartflag every single game tick - Smart Flag Management:
- Sets
GameRestart = truewhen it's safe (whenRestartRoundTime == 0.0) - Sets
GameRestart = falsenear round restarts to prevent false "game restarting" UI
- Sets
- Round End Handling: Explicitly sets
GameRestart = falseat round end to prevent UI issues
- Install CounterStrikeSharp on your CS2 server
- Compile this plugin or download the compiled DLL
- Place
FlashingHudFix.dllingame/csgo/addons/counterstrikesharp/plugins/FlashingHudFix/ - Load the plugin:
- Hot reload (no restart needed): Run
css_plugins load FlashingHudFixin server console/RCON - OR restart your server to auto-load all plugins
- Hot reload (no restart needed): Run
The fix is automatically enabled when the plugin loads - no configuration required!
dotnet buildThe compiled DLL will be in bin/Debug/net8.0/ or bin/Release/net8.0/
The plugin works automatically without any configuration. However, you may want to disable warmup on your server:
mp_warmup_online_enabled 0
mp_do_warmup_period 0
This plugin uses a different approach than the original CS2Fixes MetaMod implementation:
- CS2Fixes (MetaMod): Uses a 0.5s repeating timer to set the GameRestart flag
- This Plugin (CounterStrikeSharp): Uses the
OnTicklistener to set the flag every game tick
The per-tick approach was necessary because CounterStrikeSharp's property setters required more frequent updates to prevent HUD flashing.
The CS2Fixes MetaMod implementation can be found in:
src/utils/hud_manager.cpp- TheStartFlashingFixTimer()functionsrc/events.cpp- Round end handlingsrc/events.cpp- Warmup end logic
- Breaks Warmup: As mentioned, this workaround is incompatible with warmup periods
- Performance: The fix runs every game tick to maintain the GameRestart flag state
- Game State Dependency: Requires access to
CCSGameRulesentity
- CS2: Compatible with current CS2 builds
- CounterStrikeSharp: Requires CounterStrikeSharp API
- Other Plugins: Should be compatible with most plugins, especially surf timers
This plugin is provided as-is. You may use and modify it freely, but no warranty is provided.
- Original implementation: CS2Fixes by Source2ZE
If you encounter issues, please check:
- You have CounterStrikeSharp installed correctly
- The plugin is loaded (check console for "Plugin loaded successfully!")
- Warmup is disabled on your server
- Your surf timer or HUD plugin is functioning correctly