18.09.2016, 10:26
Sorry, my mistake "..those which were not set to 1".
I actually wrote a function yesterday that is supposed to respawn the vehicles which are not occupied (trailers that are attached to occupied vehicles won't respawn either). Just make sure that you are up-to-date to YSI for the "Vehicle" iterator:
I actually wrote a function yesterday that is supposed to respawn the vehicles which are not occupied (trailers that are attached to occupied vehicles won't respawn either). Just make sure that you are up-to-date to YSI for the "Vehicle" iterator:
pawn Code:
RespawnVehicles()
{
new bool: occupied_vehicle[MAX_VEHICLES char], vehicleid;
foreach(new i : Player)
{
if ((vehicleid = GetPlayerVehicleID(i)))
{
occupied_vehicle{vehicleid} = true;
occupied_vehicle{GetVehicleTrailer(vehicleid)} = true;
}
}
foreach(new v : Vehicle)
{
if (!occupied_vehicle{v}) SetVehicleToRespawn(v);
}
}