08.08.2014, 06:39
(
Последний раз редактировалось [XST]O_x; 08.08.2014 в 07:54.
)
Quote:
|
That code wont work at all, first you loop through the players than if you found a player inside the vehicle you get his seatid and if it isn't j (start at 0 goes till
the function returns jIf the seatid of the first person found is 0 than the function will return 1 and if the seatid isn't 0 than it will return 0 |
pawn Код:
if(GetPlayerVehicleSeat(i) == j) continue;
If the player's seat is not taken( the 'else' statement), meaning that this seat is NOT taken, return j (the ID of the empty seat).
If it looped through 0 to 8 and none were free, return -1.
Have you tried the code?
EDIT: Checked the code myself, works fine, I don't know what you're talking about. You can test it.



the function returns j