/Destroycars problem
#3

That's because you use loop. And your looping through all vehicles.
Try this code:
pawn Код:
if(strcmp(cmd, "/destroycars", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            new vehicle = GetPlayerVehicleID(playerid);
            if(PlayerInfo[playerid][pAdmin] < 1340) return SendClientMessage(playerid, COLOR_GRAD1, "Niste ovlasteni da koristite tu komandu!");
            DestroyVehicle(vehicle);
            SendClientMessage(playerid, COLOR_GREY, "Vozilo je unisteno!");
        }
    }
    return 1;
}
Reply


Messages In This Thread
/Destroycars problem - by Sandek - 05.02.2011, 22:47
Re: /Destroycars problem - by Dumb - 05.02.2011, 23:01
Re: /Destroycars problem - by xRyder - 05.02.2011, 23:08
Re: /Destroycars problem - by Sandek - 05.02.2011, 23:43
Re: /Destroycars problem - by xRyder - 06.02.2011, 00:02
Re: /Destroycars problem - by Sandek - 06.02.2011, 10:54

Forum Jump:


Users browsing this thread: 4 Guest(s)