Delete cars created by /veh
#7

pawn Код:
// Top:
new
    gStaticCars;

// GameModeInit:
gStaticCars = AddStaticVehicle(...); // This line should declare the last vehicle in OnGameModeInit, and only the last!

// Your delete cmd (single vehicle):
new
    vehicleid = GetPlayerVehicleID(playerid);

if(vehicleid > gStaticCars)
{
    DestroyVehicle(vehicleid);
}

// Your delete cmd (all vehicles):
for(new i = gStaticCars+1; i < MAX_VEHICLES; i++)
{
    if(!GetVehicleModel(i)) continue;
    DestroyVehicle(i);
}
Reply


Messages In This Thread
Delete cars created by /veh - by TheNavigator - 13.10.2011, 18:24
Re: Delete cars created by /veh - by MonkZemun - 13.10.2011, 19:53
Re: Delete cars created by /veh - by TheNavigator - 13.10.2011, 20:33
Re: Delete cars created by /veh - by AeroBlast - 13.10.2011, 20:38
Re: Delete cars created by /veh - by TheNavigator - 13.10.2011, 20:44
Re: Delete cars created by /veh - by TheNavigator - 16.10.2011, 14:26
Re: Delete cars created by /veh - by Vince - 17.10.2011, 14:37
Re: Delete cars created by /veh - by TheNavigator - 20.10.2011, 21:18
Re: Delete cars created by /veh - by =WoR=Varth - 20.10.2011, 22:01
Re: Delete cars created by /veh - by Vince - 20.10.2011, 22:39

Forum Jump:


Users browsing this thread: 1 Guest(s)