26.06.2014, 18:29
Hello!
I have this loop in my script:
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!
I have this loop in my script:
PHP код:
for(new i; i <MAX_VEHICLES; i ++)
{
if(Occupied[i] == false)
{
PutPlayerInVehicle(playerid, Vehicles[random(2)], 0);
Occupied[i] = true;
}
}
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!

