Force retry for all clients on server restart, useful to not lose all players when it restarts.
Originally Posted by ddhoward
Tested only on TF2, should work on other mods that support ClientCommand sending "retry".
Running the command sm_retryandrestart will force all clients to retry, then after a 0.1 second pause, will run the _restart command. The action will be logged to the standard sourcemod log file with the admin's information.
Running the command sm_retryandrestart 0 will cause a restart WITHOUT attempting to auto-reconnect clients. This action will be logged to the standard sourcemod log file with the admin's information.
If the cvar sm_retryonrestart_enabled = 1, the plugin will still listen for the commands _restart or quit, and make an attempt to reconnect clients before shutting down. Setting the cvar to 0 will disable this functionality.
Please note that it is IMPOSSIBLE to trigger a forced retry on clients upon server CRASH. The plugin only works if a restart was triggered intentionally through the server commands quit, _restart, or sm_retryonrestart.
Advcommands ( https://forums.alliedmods.net/showthread.php?p=889397
) for the code idea of sm_shutdown command
I posted this plugin by a request
Suggestions are welcome
If you apreciate my work, you can donate me via paypal
or with a trade offer