RedM Natives

GET_ROTATION_OF_VEHICLE_RECORDING_AT_TIME

This native does no interpolation between pathpoints.

Hash0x61787DD28B8CC0D5
Runtime nameGetRotationOfVehicleRecordingAtTime
NamespaceVEHICLE
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x2058206FBE79A8AD

Signature

Vector3 GET_ROTATION_OF_VEHICLE_RECORDING_AT_TIME(int recording, float time, const char* script);

Parameters

NameTypeDescription
recordingint—
timefloat—
scriptconst char*—

Returns Vector3

Description

This native does no interpolation between pathpoints. The same rotation will be returned for all times up to the next pathpoint in the recording.

See REQUEST_VEHICLE_RECORDING

Usage

Lua
local retval = GetRotationOfVehicleRecordingAtTime(recording, time, script)

-- always works, by hash
local retval = Citizen.InvokeNative(0x61787DD28B8CC0D5, recording, time, script, Citizen.ResultAsVector())
JavaScript and C#
JavaScript
const retval = GetRotationOfVehicleRecordingAtTime(recording, time, script);

// by hash
const retval = Citizen.invokeNative('0x61787DD28B8CC0D5', recording, time + 0.0000001, script, Citizen.returnResultAnyway(), Citizen.resultAsVector());
C#
Vector3 retval = Function.Call<Vector3>((Hash)0x61787DD28B8CC0D5, recording, time, script);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.