WeaponClientChecked by LS:MP1 output

getWeaponHudStats

GET_WEAPON_HUD_STATS0xD92C739EE34C9EBA

The 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.

SignatureJavaScript
getWeaponHudStats(weaponHash: Hash): [ok: boolean, outData: WeaponHudStats]
SignatureLua
getWeaponHudStats(weaponHash: Hash): boolean, table

Usage

JavaScript
const [ok, outData] = getWeaponHudStats(weaponHash);
Lua
local ok, outData = getWeaponHudStats(weaponHash)

Parameters

ParameterTypeJavaScriptLua
weaponHashHashnumberinteger

Returns

2 values, in this order: an array in JavaScript, multiple return values in Lua.

#ValueTypeJavaScriptLuaDescription
1okBOOLbooleanbooleanThe native’s own return value.
2outDataWeaponHudStatsWeaponHudStatstableoutput

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

Open in the interactive natives reference