A SourceMod plugin for Source servers that creates a visible countdown and prevents player joins when Steam requests a server restart.
This plugin hooks into the SteamPawn API to detect when the Steam master servers report that your server is outdated. When this happens, the plugin will:
- Display a 60-second countdown on all players' HUD (customizable time)
- Prevent new players from joining during the countdown
- Execute the
_restartcommand when the countdown ends
Warning
You're responsible for making sure your server gets updated when _restart is executed, this plugin only provides automation for that.
- SourceMod 1.11 or higher
- nosoop's SteamPawn extension (replaces the older SteamTools)
- Install nosoop's SteamPawn extension
- Upload the plugin to your
addons/sourcemod/pluginsdirectory - Upload the translations file to your
addons/sourcemod/translations/restartonupdate.phrases.txt - Restart your server or load the plugin with
sm plugins load restartonupdate - Edit the configuration in
cfg/sourcemod/restartonupdate.cfgas needed
The following ConVars can be modified in the cfg/sourcemod/restartonupdate.cfg file:
| ConVar | Default | Description |
|---|---|---|
sm_restart_time |
60 |
Time in seconds before server restarts after receiving restart request (min: 10, max: 300) |
| Command | Flag | Description |
|---|---|---|
sm_testrestart |
Root (ADMFLAG_ROOT) | Simulates receiving a restart request from Steam |
sm_cancelrestart |
Root (ADMFLAG_ROOT) | Cancels an ongoing restart countdown |
The plugin supports multiple languages through SourceMod's translation system. All messages are displayed to players in their preferred language (if available). Currently supported languages:
- English
- Spanish
- Portuguese
To add more languages or modify messages, edit the addons/sourcemod/translations/restartonupdate.phrases.txt file.
This plugin relies on nosoop's SteamPawn extension, which is a modern replacement for the older SteamTools extension. SteamPawn provides an API to interact with Steam-related functionality, including detecting when Steam requests a server restart.
SteamPawn provides the SteamPawn_OnRestartRequested() forward which is called when the Steam master servers report that your server is outdated and needs to be restarted.