rendered paste body//function forwards
forward timer_vehDestruct();
//global variables
new vehDestructTimers[MAX_VEHICLES];
//functions
public timer_vehDestruct(){
for(new i; i<MAX_VEHICLES; i++) //for every vehicle
if(vehDestructTimer[i]>300) //with a timer >= 300 seconds
SetVehicleToRespawn(i); //destroy the vehicle
else if(vehDestructTimers[i]>0) //otherwise, with a timer variable => 1
vehDestructTimers[i]++; // increment the time variable.
}
//callbacks
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(vehDestructTimers[vehicleid] == 0)
vehDestructTimers[vehicleid] = 1;
return 1;
}