12.09.2010, 06:20
pawn Код:
if (strcmp(cmd, "/restart", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] < 10)
{
SendClientMessage(playerid, COLOR_GREY, " You are not an lvl 10 Admin !");
return 1;
}
OOCOff(COLOR_OOC,"[OOC] Icecream-Bot: Server Is Restarting, Remember to /putgun and Stay Connected.");
CountDownTimer = SetTimer("CountDown", 1000, true);
CountDownVar = 10;
}
return 1;
}
pawn Код:
forward CountDown();
public CountDown()
{
CountDownVar--;
new str[64];
if(CountDownVar == 0)
{
KillTimer(CountDownTimer);
GameModeExit();
}
else
{
format(str, sizeof(str), "Count Down To Restart: %d", CountDownVar);
GameTextForAll(str, 1000, 1);
}
return 1;
}