01.01.2014, 09:22
There is no way (afaik) to save the stats when the server suddenly goes off, however there are ways around it, use a timer that saves the stats every 15 minutes maybe? atleast the damage will be less.
--If you're the one that wants to restart the server, make a command that saves the stats and executes a 7000 ms interval timer, within there is the Rcon exit command.
Starting code:
--If you're the one that wants to restart the server, make a command that saves the stats and executes a 7000 ms interval timer, within there is the Rcon exit command.
Starting code:
pawn Код:
CMD:restart(playerid, params[])
{
//code (saving the stats)
SetTimer("RestartTimer",7000,0);
return 1;
}
forward RestartTimer();
public RestartTimer()
{
SendRconCommand("exit");
}