#1

Hello!

I have this loop in my script:
PHP код:
for(new i<MAX_VEHICLES++)
{
    if(
Occupied[i] == false)
    {
        
PutPlayerInVehicle(playeridVehicles[random(2)], 0);
        
Occupied[i] = true;
   }

The loop loops thru all vehicles and checks whetever they're occpupied or not. If not, a random vehicle is picked and the player is put in it, however there is one problem: I need to make that vehicle occupied, so no one can be put in it.

Above you can see that the loop sets all vehicles to occupied. My problem is, I don't know how to recognize the random vehicle the player was put in.

Thank you for help!
Reply


Messages In This Thread
Loop - by babecka - 26.06.2014, 18:29
Re: Loop - by Vince - 26.06.2014, 18:34
Re: Loop - by babecka - 26.06.2014, 18:56

Forum Jump:


Users browsing this thread: 1 Guest(s)