/myweather cmd [+REP]
#3

pawn Код:
if(strcmp(cmd, "/weather", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][Admin] < 1)
        {
            SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
            return 1;
        }
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_WHITE, "USAGE: /weather [weatherid]");
            return 1;
        }
        new weather;
        weather = strvalEx(tmp);
        if(weather < 0||weather > 45) { SendClientMessage(playerid, COLOR_GREY, "   Weather ID can't be below 0 or above 45 !"); return 1; }
        SetPlayerWeather(playerid, weather);
        SendClientMessage(playerid, COLOR_GREY, "   Weather has been set !");
    }
    return 1;
}

        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_WHITE, "USAGE: /myweather [weatherid]");
            return 1;
        }
        new weather;
                weather = strvalEx(tmp);
Reply


Messages In This Thread
/myweather cmd [+REP] - by [SU]Spartan - 04.09.2014, 08:57
Re: /myweather cmd [+REP] - by [SU]Spartan - 04.09.2014, 09:05
Re: /myweather cmd [+REP] - by Dangjai - 05.09.2014, 02:47

Forum Jump:


Users browsing this thread: 2 Guest(s)