ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. getModelSeatPosition

Function

getModelSeatPosition

Server and clientVehiclesTrilogy Hub only

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