Cant use command
#4

Actually, There is no need for using "IsPlayerConnected(playerid)", Because we cannot use commands when we are offline ...
Use this:
pawn Код:
if(strcmp(cmd, "/refuelcars", true) == 0)
{
    if(PlayerInfo[playerid][pAdmin] < 5)
    {
        else
        {
            for(new cars=0; cars<MAX_VEHICLES; cars++)
            {
                if(!VehicleOccupied(cars))
                {
                    fuel[cars] = fuel[cars] = 100; //restoring fuel to 100
                    isrefuelling[playerid] = 0;//resetting anti-spam thingy :3
                }
            }
            format(string, sizeof(string), "%s зa?aдe вneчee eолe!", PlayerName(playerid));
            SendClientMessageToAll(COLOR_GRAD1,string);
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Cant use command - by dundolina - 18.05.2015, 11:59
Re: Cant use command - by Konstantinos - 18.05.2015, 12:01
Re: Cant use command - by StR_MaRy - 18.05.2015, 12:54
Re: Cant use command - by aCloudy - 18.05.2015, 13:03
Re: Cant use command - by Yashas - 19.05.2015, 05:27

Forum Jump:


Users browsing this thread: 1 Guest(s)