KiLLerBoy_001

GTA 5: Get free SeatIndex

Nov 15th, 2015
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. int GET_FREE_SEAT(int VehicleHandle)
  2. {
  3.     int numSeats = GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(VehicleHandle);
  4.     int SeatIndex = -1;  //Driver seat = -1
  5.     while (SeatIndex < numSeats)
  6.     {
  7.         if (IS_VEHICLE_SEAT_FREE(VehicleHandle, SeatIndex))
  8.             return SeatIndex;
  9.         SeatIndex++;
  10.     }
  11.     return -2;
  12. }
Add Comment
Please, Sign In to add comment