Vehicle Seats!
#10

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
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 j
If 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
I don't get what's wrong?
pawn Код:
if(GetPlayerVehicleSeat(i) == j) continue;
If the player's seat is j (0 to 8 ), meaning the seat is taken, continue to the next j. (0 to 1, 1 to 2...)
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.
Reply


Messages In This Thread
Vehicle Seats! - by Juvanii - 03.08.2014, 13:42
Re: Vehicle Seats! - by McBan - 03.08.2014, 13:54
Re: Vehicle Seats! - by Threshold - 03.08.2014, 14:05
Re: Vehicle Seats! - by [XST]O_x - 03.08.2014, 14:06
Re: Vehicle Seats! - by Juvanii - 03.08.2014, 14:34
Re: Vehicle Seats! - by [XST]O_x - 03.08.2014, 14:56
Re: Vehicle Seats! - by Juvanii - 07.08.2014, 15:26
Re: Vehicle Seats! - by [XST]O_x - 07.08.2014, 17:43
AW: Re: Vehicle Seats! - by Nero_3D - 08.08.2014, 02:44
Re: AW: Re: Vehicle Seats! - by [XST]O_x - 08.08.2014, 06:39

Forum Jump:


Users browsing this thread: 1 Guest(s)