HUDClientChecked by LS:MP

setHudComponentPosition

SET_HUD_COMPONENT_POSITION0xAABB1F56E2A17CED

The GTA V native SET_HUD_COMPONENT_POSITION of the HUD namespace, as LS:MP client scripts call it: the global function setHudComponentPosition, in JavaScript and in Lua.

SignatureJavaScript
setHudComponentPosition(id: number, x: number, y: number): void
SignatureLua
setHudComponentPosition(id: integer, x: number, y: number)

Usage

JavaScript
setHudComponentPosition(id, x, y);
Lua
setHudComponentPosition(id, x, y)

Parameters

ParameterTypeJavaScriptLua
idintnumberinteger
xfloatnumbernumber
yfloatnumbernumber

Returns

Nothing. In JavaScript the call evaluates to undefined.

On LS:MP

ℹ
Checked by LS:MP

id must be between 0 and 160; x, y must be finite numbers. Otherwise the call is ignored: nothing reaches the game, and no error is raised.

Reference

Namespace
HUD HUD
In the game
void SET_HUD_COMPONENT_POSITION(int id, float x, float y)
Hash
0xAABB1F56E2A17CED

Open in the interactive natives reference