getEntityQuaternion
GET_ENTITY_QUATERNION0x7B3703D2D32DFA18The 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.
getEntityQuaternion(entity: Entity): [
x: number,
y: number,
z: number,
w: number
]getEntityQuaternion(entity: Entity): number, number, number, numberUsage
JavaScript
const [x, y, z, w] = getEntityQuaternion(entity);Lua
local x, y, z, w = getEntityQuaternion(entity)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
entity | Entity | number | integer |
Returns
4 values, in this order: an array in JavaScript, multiple return values in Lua.
| # | Value | Type | JavaScript | Lua | Description |
|---|---|---|---|---|---|
| 1 | x | float | number | number | output |
| 2 | y | float | number | number | output |
| 3 | z | float | number | number | output |
| 4 | w | float | number | number | output |
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