30.06.2016, 22:49
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] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
new weatherid;
tmp = strtok(cmdtext,idx);
weatherid = strval(tmp);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, "| ERRO | Digite: /Clima [ID]");
return 1;
}
if(weatherid < -66 || weatherid > 45){
SendClientMessage(playerid, Vermelho, "| 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(ocd, string);
return 1;
}
}
}