GMX command help
#3

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;
}
Reply


Messages In This Thread
GMX command help - by aznpro12345 - 05.06.2013, 23:19
Re: GMX command help - by eblood1 - 05.06.2013, 23:31
Re: GMX command help - by SilverKiller - 05.06.2013, 23:55

Forum Jump:


Users browsing this thread: 3 Guest(s)