Added Command for Remote Restarting =]
Note: Only for Holograph.
To add command:
1.) Go to your server folder > source > virtual > users > VirtualUser.cs
2.) Open VirtualUser.cs
3.) Go to the top of VirtualUser.cs and search for 4.) Add below:
Code:
using System.Diagnostics;
5.) Then insert this command ( at the place where other your other commands are)
PHP Code:
#region Rajito's restarting Command
case "restart": //Coded by Rajito - www.rajitonetworks.tk
{
if (rankManager.containsRight(_Rank, "fuse_administrator_access", userID) == false)
return false;
userManager.sendData("BK" + stringManager.getString("scommand_hotelalert") + "\r" + "Server is restarting in 2 Minutes,\r Please finish your last stuff");
}
{
Process.GetCurrentProcess().WaitForExit(60000);
userManager.sendData("BK" + stringManager.getString("scommand_hotelalert") + "\r" + "1 Minute left till Restart...");
}
{
Process.GetCurrentProcess().WaitForExit(30000);
userManager.sendData("BK" + stringManager.getString("scommand_hotelalert") + "\r" + "30 seconds left till restart...");
}
{
Process.GetCurrentProcess().WaitForExit(30000);
userManager.sendData("BK" + stringManager.getString("scommand_hotelalert") + "\r" + " Restarting server...");
Process.GetCurrentProcess().Kill();
}
break;
#endregion
6.) Debug Your emulator.
Finished!
To remote restart, you can now use the in-game command :restart , it will send a hotel alert first, to say that the server is going to restart, and then it will restart. (You need to run Rajito's Server Restarter