EntityClient4 outputs

getEntityQuaternion

GET_ENTITY_QUATERNION0x7B3703D2D32DFA18

The GTA V native GET_ENTITY_QUATERNION of the ENTITY namespace, as LS:MP client scripts call it: the global function getEntityQuaternion, in JavaScript and in Lua.

SignatureJavaScript
getEntityQuaternion(entity: Entity): [
  x: number,
  y: number,
  z: number,
  w: number
]
SignatureLua
getEntityQuaternion(entity: Entity): number, number, number, number

Usage

JavaScript
const [x, y, z, w] = getEntityQuaternion(entity);
Lua
local x, y, z, w = getEntityQuaternion(entity)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger

Returns

4 values, in this order: an array in JavaScript, multiple return values in Lua.

#ValueTypeJavaScriptLuaDescription
1xfloatnumbernumberoutput
2yfloatnumbernumberoutput
3zfloatnumbernumberoutput
4wfloatnumbernumberoutput

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

w is the correct parameter name!

Reference

Namespace
Entity ENTITY
In the game
void GET_ENTITY_QUATERNION(Entity entity, float* x, float* y, float* z, float* w)
Hash
0x7B3703D2D32DFA18

Open in the interactive natives reference