04.01.2009, 12:41
Код:
// top of the script.
new counter=10;
// at forwards.
forward CountDown(playerid);
forward RestartServerCasovac()
// at OnGameModeInit.
SetTimer("RestartServerCasovac",1000,1);
// at public functions.
public RestartServerCasovac()
{
new Hour, Minute, Second;
gettime(Hour, Minute, Second);
if(Hour == 3 && Minute == 0 && Second == 0)
{
SetTimer("CountDown",1000,1);
}
return 1;
}
public CountDown(playerid)
{
new string[256];
counter -= 1;
format(string,sizeof(string),"Server Restarts in %d seconds!", counter);
GameTextForAll(string,1000,3);
if(counter == 0)
{
// here your restart server function.
}
}

