getHudComponentPosition
GET_HUD_COMPONENT_POSITION0x223CA69A8C4417FDThe GTA V native GET_HUD_COMPONENT_POSITION of the HUD namespace, as LS:MP client scripts call it: the global function getHudComponentPosition, in JavaScript and in Lua.
getHudComponentPosition(id: number): { x: number, y: number, z: number }getHudComponentPosition(id: integer): Vector3Usage
JavaScript
const { x, y, z } = getHudComponentPosition(id);Lua
local coords = getHudComponentPosition(id)
-- coords.x, coords.y, coords.zParameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
id | int | number | integer |
Returns
Vector3 JavaScript { x: number, y: number, z: number }, Lua Vector3A 3D vector. JavaScript gets a plain { x, y, z } object; Lua gets a real Vector3, with .x .y .z and arithmetic. As an argument, one vector fills three consecutive coordinates.
On LS:MP
ℹ
Checked by LS:MP
id must be between 0 and 160. Otherwise the call is ignored and returns a zero vector: nothing reaches the game, and no error is raised.
Reference
- Namespace
- HUD HUD
- In the game
Vector3 GET_HUD_COMPONENT_POSITION(int id)- Hash
0x223CA69A8C4417FD