Set time problem
#7

try it:
pawn Код:
CMD:setalltime(playerid,params[])
{
    if(PlayerInfo[playerid][Level] >= 4)
    {
        if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /setalltime [hour]");
        new var = strval(params), string[128];

        if(var > 24) return SendClientMessage(playerid, red, "ERROR: Invalid hour");
        CMDMessageToAdmins(playerid,"SETALLTIME");

        for(new playerid; playerid < MAX_PLAYERS; ++playerid)
        {
            if(IsPlayerConnected(i))
            {
                PlayerPlaySound(i,1057,0.0,0.0,0.0);
                SetWorldTime(var);
            }
        }
        format(string,sizeof(string),"Administrator \"%s\" has set all players time to '%d:00'", pName(playerid), var );
        return SendClientMessageToAll(blue, string);
    } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}
Reply


Messages In This Thread
Set time problem - by ZaBraNjeNi - 02.04.2015, 12:14
Re: Set time problem - by BroZeus - 02.04.2015, 12:25
Re: Set time problem - by ZaBraNjeNi - 02.04.2015, 12:34
Re: Set time problem - by CalvinC - 02.04.2015, 12:39
Re: Set time problem - by ZaBraNjeNi - 02.04.2015, 12:56
Re: Set time problem - by ZaBraNjeNi - 03.04.2015, 15:05
Re: Set time problem - by StarPeens - 03.04.2015, 16:11
Re: Set time problem - by CalvinC - 03.04.2015, 16:17
Re: Set time problem - by StarPeens - 03.04.2015, 16:21
Re: Set time problem - by ZaBraNjeNi - 03.04.2015, 19:11

Forum Jump:


Users browsing this thread: 2 Guest(s)