help fix command
#1

CMDetalltime(playerid,params[]) {
if(PlayerInfo[playerid][Level] >= 3) {
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 i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) {
PlayerPlaySound(i,1057,0.0,0.0,0.0);
SetPlayerTime(i, var, 0);
}
}
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");
}

Nothing change /setalltime 1-24
Reply
#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
#3

C:\Users\USER\Desktop\codww.pwn(15162) : error 001: expected token: ",", but found "-string-"
C:\Users\USER\Desktop\codww.pwn(15162) : warning 215: expression has no effect
C:\Users\USER\Desktop\codww.pwn(15162) : warning 215: expression has no effect
C:\Users\USER\Desktop\codww.pwn(15162) : error 001: expected token: ";", but found ")"
C:\Users\USER\Desktop\codww.pwn(15162) : error 029: invalid expression, assumed zero
C:\Users\USER\Desktop\codww.pwn(15162) : fatal error 107: too many error messages on one line
Reply
#4

Show me that line pls
Reply
#5

Reply
#6

Dude have you copied my command?? Because i don't see it there..
Reply
#7

Reply
#8

Instead of this
PHP код:
if(sscanf(params "i"time)) 
put this
PHP код:
if(sscanf(params"i"time)) 
On 15163 line
Reply
#9


still nothing change , btw can you help me how to delete that < in news box
Reply
#10

Try with removing that IsPlayerConnected(i)

And that < probably is text draw. just delete it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)