I need help here with / climate
#1

Guys when I 'm going to use the command / climate climate changes do not help me?

PHP код:
    if(strcmp(cmd,"/clima",true) == 0){
    if(
pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == 5){
    new 
weatherid;
    
tmp strtok(cmdtext,idx);
    
weatherid strval(tmp);
    if(!
strlen(tmp)){
    
SendClientMessage(playeridVermelho"| ERRO | Digite: /Clima [ID]");
    return 
1;
    }
    if(
weatherid < -66 || weatherid 45){
    
SendClientMessage(playeridVermelho"| ERRO | ID invбlido!");
    return 
1;
    }else{
    
SetWeather(weatherid);
    new 
Names[30];
    
GetPlayerName(playerid,Names,sizeof(Names));
    
format(string,sizeof(string),"| INFO-SERVER | O(a) Administrador(a) %s  mudou o clima para '%d' !",Names,weatherid);
    
SendClientMessageToAll(ocdstring);
    return 
1;
    }
    }
    } 
Reply
#2

Try it
PHP код:
    if(strcmp(cmd,"/clima",true) == 0)
        {
            if(
pAdmin[playerid] < || pAdmin[playerid] > 5) return SendClientMessage(playerid, -1"you no have permission");
            new 
weatheridstring[128];
            
tmp strtok(cmdtext,idx);
            
weatherid strval(tmp);
            if(!
strlen(tmp)) return SendClientMessage(playeridVermelho"| ERRO | Digite: /Clima [ID]");
            if(
weatherid < -66 || weatherid 45) return SendClientMessage(playeridVermelho"| ERRO | ID invбlido!");
            
SetWeather(weatherid);
            new 
Names[30];
            
GetPlayerName(playerid,Names,sizeof(Names));
            
format(string,sizeof(string),"| INFO-SERVER | O(a) Administrador(a) %s  mudou o clima para '%d'     !",Names,weatherid);
            
SendClientMessageToAll(playeridstring);
            return 
1;
        } 
Reply
#3

Did you declare idx anywhere?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)