getWeaponHudStats
GET_WEAPON_HUD_STATS0xD92C739EE34C9EBAThe GTA V native GET_WEAPON_HUD_STATS of the WEAPON namespace, as LS:MP client scripts call it: the global function getWeaponHudStats, in JavaScript and in Lua.
getWeaponHudStats(weaponHash: Hash): [ok: boolean, outData: WeaponHudStats]getWeaponHudStats(weaponHash: Hash): boolean, tableUsage
JavaScript
const [ok, outData] = getWeaponHudStats(weaponHash);Lua
local ok, outData = getWeaponHudStats(weaponHash)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
weaponHash | 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
ℹ
Weapon UI ratings
Pass the weapon 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_HUD_STATS(Hash weaponHash, WeaponHudStats* outData)- Hash
0xD92C739EE34C9EBA