I hope ShutdownServer can return a exit code. :D
I think you want this.
else if ( cmd == "shutdown" )
{
Message("[#ff0000]Server shutting down!")
ShutdownServer();
}
It's showing
Just tested an it worked
@ysc3839 you can use timer
else if(cmd=="shutitdown")
{
Message("abra ka dabra, server gonna shutdown in 5secs");
NewTimer("ShutdownServer",5000,1);
}
He means passing an integer with an arbitrary number that allows the wrapper who executed the server to be informed of the shutdown reason. Allowing you to know why your server shutdown from an external software through certain codes known by the script and the server launcher.
Example:
ShutdownServer(3);
Return code is 3, which could signal that we want to restart 1 hour later.
Example:
ShutdownServer(-2);
Return code is -2, which could signal that the script couldn't access the database.
etc.
Quote from: S.L.C on Jul 31, 2015, 07:14 PMHe means passing an integer with an arbitrary number that allows the wrapper who executed the server to be informed of the shutdown reason. Allowing you to know why your server shutdown from an external software through certain codes known by the script and the server launcher.
Example:
ShutdownServer(3);
Return code is 3, which could signal that we want to restart 1 hour later.
Example:
ShutdownServer(-2);
Return code is -2, which could signal that the script couldn't access the database.
etc.
Yes! :)