RedM Natives

SET_ENTITY_ROTATION

Hash0x9CC8314DFEDE441E
Runtime nameSetEntityRotation
NamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x8524A8B0171D5E07

Signature

void SET_ENTITY_ROTATION(Entity entity, float pitch, float roll, float yaw, int rotationOrder, BOOL p5);

Parameters

NameTypeDescription
entityEntity—
pitchfloat—
rollfloat—
yawfloat—
rotationOrderint—
p5BOOL—

Returns void

Usage

Lua
SetEntityRotation(entity, pitch, roll, yaw, rotationOrder, p5)

-- always works, by hash
Citizen.InvokeNative(0x9CC8314DFEDE441E, entity, pitch, roll, yaw, rotationOrder, p5)
JavaScript and C#
JavaScript
SetEntityRotation(entity, pitch, roll, yaw, rotationOrder, p5);

// by hash
Citizen.invokeNative('0x9CC8314DFEDE441E', entity, pitch + 0.0000001, roll + 0.0000001, yaw + 0.0000001, rotationOrder, p5);
C#
Function.Call((Hash)0x9CC8314DFEDE441E, entity, pitch, roll, yaw, rotationOrder, p5);
  • 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.

Enums and flags

See also

Sources

alloc8or RDR3 NativeDB

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