17.10.2011, 14:37
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);
}