View Single Post
Author Message
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 12-08-2012 , 12:49   [ANY] Anti server empty after restart
Reply With Quote #1

Description:

Force retry for all clients on server restart, useful to not lose all players when it restarts.

Quote:
Originally Posted by ddhoward View Post
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.

Credits:

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


Donations (optional):

If you apreciate my work, you can donate me via paypal or with a trade offer


Download:

Main repository
Direct download
Code changes
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.


Last edited by Franc1sco; 12-09-2018 at 04:46.
Franc1sco is offline
Send a message via MSN to Franc1sco