05.06.2013, 23:55
(
Последний раз редактировалось SilverKiller; 06.06.2013 в 13:44.
)
pawn Код:
new
RestartTime = 10,
RestartTimer,
str[512];
CMD:gmx(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 99997)
{
RestartTimer = SetTimer("ServerRestartTime",1000,true);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
}
return 1;
}
forward ServerRestartTime(playerid);
public ServerRestartTime(playerid)
{
RestartTime--;
if(RestartTime == 0)
{
KillTimer(RestartTimer);
RestartTime = 10;
SendRconCommand("gmx");
return 1;
}
format(str,sizeof(str),"~g~Server Restart: ~r~%d",RestartTime);
GameTextForAll(str,1150,3);
return 1;
}