- Documentation
- Shared functions
- getModelSeatPosition
Function
getModelSeatPosition
Returns a model's current seat position and the source of the data: script (set by script), dummy (from the model's helper point) or default (factory, from the game).
Syntax
float, float, float, float, string getModelSeatPosition(int model, int seat)Arguments
modelint- Vehicle model ID.
seatint- Seat 0-7.
Returns
x, y, z (metres, vehicle space), heading (degrees), source; false when unknown.
Example
local x, y, z, heading, source = getModelSeatPosition(411, 0)
if x then outputDebugString(("Kierowca: %.2f %.2f %.2f (%s)"):format(x, y, z, source)) end
See also
setModelSeatPositionMoves 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 fromengineRequestModelandengineReplaceModel, which by default have the base car's seats. The number of seats does not change.getModelDefaultSeatPositionReturns the game's factory seat position for a model (for new models, of the base model), without script changes.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.