help fix command
#2

PHP код:
CMD:setalltime(playerid,params[])
{
    if(
PlayerInfo[playerid][Level] >= 3)
    {
        new 
time;
        if(
sscanf(params "i"time))
        {
            
SendClientMessage(playeridred"Usage: /settimeall [hour] ");
            return 
1;
        }
        if(
time 24) return SendClientMessage(playeridred"ERROR: Invalid hour");
        
CMDMessageToAdmins(playerid,"SETALLTIME");
        for(new 
0MAX_PLAYERSi++)
        {
            if(
IsPlayerConnected(i))
            {
                
PlayerPlaySound(i,1057,0.0,0.0,0.0);
                
SetPlayerTime(itime 0);
            }
        }
        new 
string[65];
        
format(stringsizeof(string), "Administrator \"%s\" has set all players time to '%d:00'"pName(playerid), time);
        return 
SendClientMessageToAll(bluestring);
    }
    else return 
SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");

Tell me if is something wrong
Reply


Messages In This Thread
help fix command - by kevin132312 - 22.10.2016, 17:31
Re: help fix command - by Micko123 - 22.10.2016, 17:37
Re: help fix command - by kevin132312 - 22.10.2016, 17:44
Re: help fix command - by Micko123 - 22.10.2016, 17:49
Re: help fix command - by kevin132312 - 22.10.2016, 17:52
Re: help fix command - by Micko123 - 22.10.2016, 17:54
Re: help fix command - by kevin132312 - 22.10.2016, 17:58
Re: help fix command - by Micko123 - 22.10.2016, 17:59
Re: help fix command - by kevin132312 - 22.10.2016, 18:07
Re: help fix command - by Micko123 - 22.10.2016, 18:10

Forum Jump:


Users browsing this thread: 1 Guest(s)