ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setModelSeatPosition

Function

setModelSeatPosition

ServerVehiclesTrilogy Hub only

Moves a seat position in a vehicle for the whole model, for every player: where the ped sits and which way it faces. Most often used to place seats in new vehicles from engineRequestModel and engineReplaceModel, which by default have the base car's seats. The number of seats does not change.

Syntax

bool setModelSeatPosition(int model, int seat, float x, float y, float z [, float heading = 0])

Arguments

modelint
Vehicle model ID.
seatint
Seat 0-7 (0 = driver, 1 = front passenger, 2-3 rear).
xfloat
Offset to the right of the vehicle's centre in metres (up to 50).
yfloat
Offset forwards in metres.
zfloat
Offset upwards in metres.
headingfloat, optional = 0
The ped's rotation relative to the vehicle in degrees (0 = facing forwards).

Returns

true on success.

Example

setModelSeatPosition(411, 0, -0.45, -0.1, 0.05)
setModelSeatPosition(411, 1, 0.45, -0.1, 0.05)

See also