29.03.2010, 21:36
what the if for if some one in the car it does not detele and if no some is in there then it does not delete
forward DeleteCars();
public DeleteCars()
{
new usedcars[MAX_VEHICLES];
for(new playerid;playerid<MAX_PLAYERS;playerid++)
{
if( IsPlayerConnected(playerid) && IsPlayerInAnyVehicle(playerid) )usedcars[GetPlayerVehicleID(playerid)-1] = 1;
}
for(new vehicleid;vehicleid<MAX_VEHICLES;playerid++)
{
if( !usedcars[vehicleid] )DestroyVehicle(vehicleid);
}
}
DestroyVehicle(TmpVehicle[playerid]);
DestroyVehicle(TmpVehicle[playerid]);