- Documentation
- Server functions
- setModelSeatPosition
Function
setModelSeatPosition
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
getModelSeatPositionReturns a model's current seat position and the source of the data:script(set by script),dummy(from the model's helper point) ordefault(factory, from the game).resetModelSeatPositionRestores the factory (or inherited from the base model) position of one seat of a model or, without a seat number, of all its seats.setModelSeatsFromCopies seat positions from another model to the given model, e.g. a new vehicle fromengineRequestModelshould seat people like a Sultan. Without a seat number it copies every seat the source has.