VehicleClient

getPositionOfVehicleRecordingIdAtTime

GET_POSITION_OF_VEHICLE_RECORDING_ID_AT_TIME0x92523B76657A517D

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

SignatureJavaScript
getPositionOfVehicleRecordingIdAtTime(
  id: number,
  time: number
): { x: number, y: number, z: number }
SignatureLua
getPositionOfVehicleRecordingIdAtTime(id: integer, time: number): Vector3

Usage

JavaScript
const { x, y, z } = getPositionOfVehicleRecordingIdAtTime(id, time);
Lua
local coords = getPositionOfVehicleRecordingIdAtTime(id, time)
-- coords.x, coords.y, coords.z

Parameters

ParameterTypeJavaScriptLua
idintnumberinteger
timefloatnumbernumber

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_POSITION_OF_VEHICLE_RECORDING_ID_AT_TIME(int id, float time)
Hash
0x92523B76657A517D

Open in the interactive natives reference