VehicleClient

getEntryPointPosition

GET_ENTRY_POINT_POSITION0xC0572928C0ABFDA3

The GTA V native GET_ENTRY_POINT_POSITION of the VEHICLE namespace, as LS:MP client scripts call it: the global function getEntryPointPosition, in JavaScript and in Lua.

SignatureJavaScript
getEntryPointPosition(
  vehicle: Vehicle,
  doorId: number
): { x: number, y: number, z: number }
SignatureLua
getEntryPointPosition(vehicle: Vehicle, doorId: integer): Vector3

Usage

JavaScript
const { x, y, z } = getEntryPointPosition(vehicle, doorId);
Lua
local coords = getEntryPointPosition(vehicle, doorId)
-- coords.x, coords.y, coords.z

Parameters

ParameterTypeJavaScriptLuaDescription
vehicleVehiclenumberinteger
doorIdintnumberintegersee setVehicleDoorShut

Returns

Vector3 JavaScript { x: number, y: number, z: number }, Lua Vector3

A 3D vector. JavaScript gets a plain { x, y, z } object; Lua gets a real Vector3, with .x .y .z and arithmetic. As an argument, one vector fills three consecutive coordinates.

Reference

Namespace
Vehicle VEHICLE
In the game
Vector3 GET_ENTRY_POINT_POSITION(Vehicle vehicle, int doorId)
Hash
0xC0572928C0ABFDA3
Introduced
Game build 944 legacy numbering
Formerly
_GET_ENTRY_POSITION_OF_DOOR

Open in the interactive natives reference