SA-MP Forums Archive
Restart at a certain time - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Restart at a certain time (/showthread.php?tid=162797)



Restart at a certain time - iLcke - 24.07.2010

Okay, so, i seen it on a few servers, if the server time is 12:00 it sends a message saying Restart in 5 minutes, and at 12:05 server would restart, how would i do it?


Re: Restart at a certain time - selten98 - 24.07.2010

make i timer... with exactly that time...
like
pawn Код:
//1000 = 1 sec 10000 = 10 s 60000 = 1m 1440000 = 24m = samptime: 1day
SetTimer("RestartTimer",1440000,1); {
GameTextForAll("Server Restart in 5 minutes",1500,3);
}
SetTimer("GMX",1740000,1); {
SendRconCommand(//command);
} // IT BUGS IT WILL SHUT THE SERVE DOWN IMMEDIATLY



Re: Restart at a certain time - VictorMartinez - 24.07.2010

that method is unreliable. instead, edit your clock to call a callback at 12 o clock.

the callback it will call must be made by you and it should have a timer that is set to 5 minutes that will then call another callback, OnGameModeExit()


Re: Restart at a certain time - iLcke - 24.07.2010

im a lil confussed..