so, habs geändert. nun löscht der die fahrzeuge.
#define CAR_AMOUNT 600
public OnGameModeInit()
{
SetTimer("carspawn",10000,1);
return 1;
}
forward carspawn();
public carspawn()
{
new bool:unwanted[CAR_AMOUNT];
for(new player=0; player<MAX_PLAYERS; player++)
{
if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
}
for(new car = 1; car <= 420; car++)
{
if(!unwanted[car]) DestroyVehicle(car);
}
return 1;
}