RedM Natives

SET_GAMEPLAY_CAM_RELATIVE_HEADING

Sets the camera position relative to heading in float from -360 to +360.

Hash0x5D1EB123EAC5D071
Runtime nameSetGameplayCamRelativeHeading
NamespaceCAMERA
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xB4EC2312F4E5B1F1

Signature

void SET_GAMEPLAY_CAM_RELATIVE_HEADING(float heading, float p1);

Parameters

NameTypeDescription
headingfloat—
p1float—

Returns void

Description

Sets the camera position relative to heading in float from -360 to +360.

Heading is always 0 in aiming camera.

Usage

Lua
SetGameplayCamRelativeHeading(heading, p1)

-- always works, by hash
Citizen.InvokeNative(0x5D1EB123EAC5D071, heading, p1)
JavaScript and C#
JavaScript
SetGameplayCamRelativeHeading(heading, p1);

// by hash
Citizen.invokeNative('0x5D1EB123EAC5D071', heading + 0.0000001, p1 + 0.0000001);
C#
Function.Call((Hash)0x5D1EB123EAC5D071, heading, p1);
  • 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.

See also

Sources

alloc8or RDR3 NativeDB

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