16.11.2009, 13:06
Imagine i have 50 vehicles spawned, i've defined MAX_VEHICLES as 100.
Then i destroy vehicle IDs 3, 8, 25
So now i have 47 vehicles left, IDs 1-50 with slots 3, 8 and 25 available.
When a vehicle is created, i will set it VehSpawned[vehid] = 1;
So when looping i will need to find the first available slot, which will be VehSpawned[vehid] == 0
If im looping But how would i create a loop that will stop when it finds the first available slot?
Instead of looping through 100 slots...
Then i destroy vehicle IDs 3, 8, 25
So now i have 47 vehicles left, IDs 1-50 with slots 3, 8 and 25 available.
When a vehicle is created, i will set it VehSpawned[vehid] = 1;
So when looping i will need to find the first available slot, which will be VehSpawned[vehid] == 0
If im looping But how would i create a loop that will stop when it finds the first available slot?
Instead of looping through 100 slots...