getWeaponComponentHudStats
GET_WEAPON_COMPONENT_HUD_STATS0xB3CAF387AE12E9F8The GTA V native GET_WEAPON_COMPONENT_HUD_STATS of the WEAPON namespace, as LS:MP client scripts call it: the global function getWeaponComponentHudStats, in JavaScript and in Lua.
getWeaponComponentHudStats(componentHash: Hash): [
ok: boolean,
outData: WeaponHudStats
]getWeaponComponentHudStats(componentHash: Hash): boolean, tableUsage
JavaScript
const [ok, outData] = getWeaponComponentHudStats(componentHash);Lua
local ok, outData = getWeaponComponentHudStats(componentHash)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
componentHash | Hash | number | integer |
Returns
2 values, in this order: an array in JavaScript, multiple return values in Lua.
| # | Value | Type | JavaScript | Lua | Description |
|---|---|---|---|---|---|
| 1 | ok | BOOL | boolean | boolean | The native’s own return value. |
| 2 | outData | WeaponHudStats | WeaponHudStats | table | output |
On LS:MP
ℹ
Component UI ratings
Pass the component hash. Read the ratings record only when the leading success value is true.
ℹ
GTA V Enhanced 1158.16
This LS:MP adapter is available on Enhanced 1158.16. Calls on another build raise an error.
Reference
- Namespace
- Weapon WEAPON
- In the game
BOOL GET_WEAPON_COMPONENT_HUD_STATS(Hash componentHash, WeaponHudStats* outData)- Hash
0xB3CAF387AE12E9F8