Destroying emtpy vehicles
#5

pawn Код:
stock IsVehicleOccupied(vehicleid)
{
    for (new i = 0; i < GetMaxPlayers(); i ++)
    {
        if (GetPlayerVehicleID(playerid) == vehicleid) return true;
    }
    return false;
}
Just written, so untested. This checks if a specific vehicle is occupied. You can use it in a loop through all vehicles to delete all unsused ones. Not the fastest method, but should be fine if you dont want to delete the vehicles every second
Reply


Messages In This Thread
Destroying emtpy vehicles - by gamerhead - 21.05.2011, 20:33
Re: Destroying emtpy vehicles - by xalith - 21.05.2011, 20:39
Re: Destroying emtpy vehicles - by Vince - 21.05.2011, 20:40
Re: Destroying emtpy vehicles - by gamerhead - 21.05.2011, 20:48
Re: Destroying emtpy vehicles - by Mauzen - 21.05.2011, 20:54
Re: Destroying emtpy vehicles - by xalith - 21.05.2011, 21:01
Re: Destroying emtpy vehicles - by gamerhead - 22.05.2011, 07:13
Re: Destroying emtpy vehicles - by Sascha - 22.05.2011, 07:29

Forum Jump:


Users browsing this thread: 1 Guest(s)