10.08.2016, 16:12
Quote:
Here is the command +REP if helped
Код:
RespawnNearbyVehicles(playerid, radius); |
@OP: you want to create a vehicle loop and then check the distance for each vehicle. I recommend using IsVehicleStreamedIn to only respawn those vehicles that are currently within the stream distance. I believe this will be the fastest; distance calculation is quite expensive.
PHP код:
for(new i = 1, j = GetVehiclePoolSize(); i <= j; i++)
{
if(IsVehicleStreamedIn(i, playerid))
{
SetVehicleToRespawn(i);
}
}