getPositionOfVehicleRecordingAtTime
GET_POSITION_OF_VEHICLE_RECORDING_AT_TIME0xD242728AA6F0FBA2The GTA V native GET_POSITION_OF_VEHICLE_RECORDING_AT_TIME of the VEHICLE namespace, as LS:MP client scripts call it: the global function getPositionOfVehicleRecordingAtTime, in JavaScript and in Lua.
getPositionOfVehicleRecordingAtTime(
recording: number,
time: number,
script: string
): { x: number, y: number, z: number }getPositionOfVehicleRecordingAtTime(
recording: integer,
time: number,
script: string
): Vector3Usage
JavaScript
const { x, y, z } = getPositionOfVehicleRecordingAtTime(recording, time, script);Lua
local coords = getPositionOfVehicleRecordingAtTime(recording, time, script)
-- coords.x, coords.y, coords.zParameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
recording | int | number | integer |
time | float | number | number |
script | string | string | string |
Returns
Vector3 JavaScript { x: number, y: number, z: number }, Lua Vector3A 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.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
This native does no interpolation between pathpoints. The same position will be returned for all times up to the next pathpoint in the recording.
Reference
- Namespace
- Vehicle VEHICLE
- In the game
Vector3 GET_POSITION_OF_VEHICLE_RECORDING_AT_TIME(int recording, float time, const char* script)- Hash
0xD242728AA6F0FBA2