This plugin is intended to introduce server restart ability with a menu command.
Features:
- highly customizable text options (see translation file), available for:
* chat (once)
* chat (repeatable)
* hint (center screen) text
* console
* kick message
- safe server shutdown, algorithm:
* freeze all players to make attention to this important vote
* stops the director (for L4D series only)
* unload all plugins
* unload accelerator extension to prevent the false crash report
* kick all players with an appropriate (adjustable) message
* actual server restart
- Logging
- Cancel / force the vote
- Multiple admin flags are supported
Logfile location:
- addons/sourcemod/logs/vote_restart.log
Requirements:
- GeoIP extension (included in SourceMod).
Commands:
- sm_restart - Start the vote with access check
- sm_voterestart - same as above
- sm_veto - Allow admin to veto current vote (with "d", ban flag)
- sm_votepass - Allow admin to bypass current vote (with "z" flag)
ConVars (settings):
Available in: cfg/sourcemod/sm_voterestart.cfg:
sm_voterestart_accessflag - def.: z - Admin flag(s) required to start the vote
sm_voterestart_method - def.: 2 - Restart method (1 - _restart, 2 - crash)
sm_voterestart_log - def.: 1 - Use logging? (1 - Yes / 0 - No)
sm_voterestart_unload_ext_num - def.: 0 - If you have Accelerator extension, you need specify here order number of this extension in the list: sm exts list
sm_voterestart_announcedelay - def.: 5.0 - Delay (in sec.) between announce and vote menu appearing
sm_voterestart_timeout - def.: 10 - How long (in sec.) does the vote last
sm_voterestart_actiondelay - def.: 5 - Delay (in sec.) before actual restarting, after displaying restart message
Languages
- Russian
- English
Installation
1. Place l4d_voterestart.smx file to addons/sourcemod/plugins
2. Place l4d_voterestart.phrases.txt file to addons/sourcemod/translations
3. Change the map
4.
If you have "Accelerator" extension, do this:
Run in server console such command:
Code:
sm exts list
You'll see something like this:
Code:
sm exts list
[SM] Displaying 14 extensions:
[01] [L4D2] 8+ Players BugFixes (1.0.6): This extension try fix some bugs on server have more than 8 players
[02] Accelerator (2.5.0): SRCDS Crash Handler
As you see, Accelerator is under number "02", so you need set ConVar "sm_voterestart_unload_ext_num" to 2 in cfg/sourcemod/sm_voterestart.cfg file (change to your own order number).
1.1
- Added ability to unload "Accelerator" extension.
1.2 (26-Nov-2020)
- Updated for [ANY] type of game servers.
- Added more options.
- Added kicking clients.
- Added new command alias "sm_voterestart".
- Fixed: unfreeze when !veto commanded or timeout reached.
TODO:
- Find a way to detect Accelerator extension load order number automatically.
Donate
Donates are very appreciated and welcomed for further inspiration, make me happy, and make next updates came out more often:
- Patreon (Paypal)
- BitCoin
- Ю.Money