Skip to content

Conversation

@MohabCodeX
Copy link
Contributor

This PR adds an optional seat parameter to setPedEnterVehicle.

The implementation reuses the existing seat validation logic from warpPedIntoVehicle.
When a seat is specified, it validates that:

  • The seat number doesn't exceed the vehicle's maximum passenger count
  • The vehicle model supports passengers (some models return 255 for invalid passenger counts)

Syntax:

bool setPedEnterVehicle ( ped thePed [, vehicle theVehicle = nil, bool passenger = false, int seat = nil ] )

Optional Arguments:

  • theVehicle: The vehicle to enter. If not specified, the ped will enter the nearest vehicle
  • passenger: If set to true and no seat is specified, the ped will enter as a passenger
  • seat: The seat number to enter (0-8). If specified, this overrides the passenger parameter

Note

The seat parameter takes priority over the passenger parameter.

Examples:

-- Enter driver seat
setPedEnterVehicle(ped, vehicle, false)

-- Enter as passenger (auto-determines seat)
setPedEnterVehicle(ped, vehicle, true)

-- Enter specific seats
setPedEnterVehicle(ped, vehicle, nil, 0)  -- Driver seat
setPedEnterVehicle(ped, vehicle, nil, 1)  -- Front passenger
setPedEnterVehicle(ped, vehicle, nil, 2)  
2025-11-23.15-13-33.2.mp4

Testing

hit.zip

@FileEX FileEX added the enhancement New feature or request label Nov 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants