[Solved]Create a loop to stop at the first available slot...
#1

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...

Reply


Messages In This Thread
[Solved]Create a loop to stop at the first available slot... - by Outbreak - 16.11.2009, 13:06
Re: [Help?]Create a loop to stop at the first available slot... - by yom - 16.11.2009, 13:24
Re: [Help?]Create a loop to stop at the first available slot... - by Donny_k - 16.11.2009, 13:28
Re: [Help?]Create a loop to stop at the first available slot... - by Outbreak - 16.11.2009, 14:19

Forum Jump:


Users browsing this thread: 1 Guest(s)