SA-MP Forums Archive
I need help here with / climate - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I need help here with / climate (/showthread.php?tid=610972)



I need help here with / climate - baela - 30.06.2016

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



Re: I need help here with / climate - moura98 - 30.06.2016

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



Re: I need help here with / climate - DTV - 01.07.2016

Did you declare idx anywhere?