RedM Natives

SET_ENTITY_HEADING

Hash0xCF2B9C0645C4651B
Runtime nameSetEntityHeading
NamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x8E2530AA8ADA980E

Signature

void SET_ENTITY_HEADING(Entity entity, float heading);

Parameters

NameTypeDescription
entityEntity—
headingfloat—

Returns void

Usage

Lua
SetEntityHeading(entity, heading)

-- always works, by hash
Citizen.InvokeNative(0xCF2B9C0645C4651B, entity, heading)
JavaScript and C#
JavaScript
SetEntityHeading(entity, heading);

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