SetTimer(\"KocsiResi\", 5000, 1); //public OnGameModeInit alá
// valahova a mod aljába
forward KocsiResi();
public KocsiResi()
{
for(new i;i<MAX_VEHICLES;i++)
{
new motor, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(i, motor, lights, alarm, doors, bonnet, boot, objective);
if(motor == 0 && LefoglalvaE(i) == false) SetVehicleToRespawn(i);
}
return 1;
}
stock bool:LefoglalvaE(vehicleid)
{
for(new p; p<MAX_PLAYERS; p++)
{
if(IsPlayerInVehicle(p, vehicleid)) return true;
}
return false;
}
Nem teszteltem, szerintem jó.