[HELP] /setweather command
#10

i will give you btw i try to do in 2 ways SetWeather and SetPlayerWeather and still the same

PHP код:
    if(strcmp(cmd"/setweather"true) == && PlayerAdminLevel[playerid] == 2// Gives a player money
    
{
    new 
weatherstr[128];
    
tmp strtok(cmdtextidx);
    if(!
strlen(tmp)){
    
SendClientMessage(playeridCOLOR_ERROR"USAGE: /setweather (weatherid)");
    return 
1;
    }
    if(!
IsNumeric(tmp)){
    
SendClientMessage(playeridCOLOR_ERROR"USAGE: /setweather (weatherid) WeatherID Must be a number");
    return 
1;
    }
    
weather strval(tmp);
    
tmp strtok(cmdtextidx);
    if(
weather || weather 50){
    
SendClientMessage(playerid,COLOR_ERROR,"WeatherID Cant Be Less Than 0 And More Than 50");
    return 
1;
    }
    for(new 
i=0;i<MAX_PLAYERS;i++)
    
SetPlayerWeather(i,weather);
    
format(stringsizeof(string), "Server %s Has Set Server WeatherID To %d",AdminRanks[PlayerAdminLevel[playerid]], weather);
    
SendClientMessageToAll(0xB22222AAstring);
    
format(strsizeof(str),"You Have Set Server WeatherID To %d",weather);
    
SendClientMessage(playerid,COLOR_GREEN,str);
    return 
1;
    } 
Reply


Messages In This Thread
[HELP] /setweather command - by [MKD]Max - 28.06.2011, 11:36
Re: [HELP] /setweather command - by iPLEOMAX - 28.06.2011, 11:42
Re: [HELP] /setweather command - by [MKD]Max - 28.06.2011, 12:01
Re: [HELP] /setweather command - by [MKD]Max - 28.06.2011, 15:40
Re: [HELP] /setweather command - by Shadoww5 - 28.06.2011, 15:48
Re: [HELP] /setweather command - by [MKD]Max - 28.06.2011, 18:07
Re: [HELP] /setweather command - by iPLEOMAX - 28.06.2011, 18:12
Re: [HELP] /setweather command - by [MKD]Max - 28.06.2011, 18:47
Re: [HELP] /setweather command - by Shadoww5 - 28.06.2011, 18:57
Re: [HELP] /setweather command - by [MKD]Max - 28.06.2011, 19:04

Forum Jump:


Users browsing this thread: 6 Guest(s)