WeaponClient

isWeaponValid

IS_WEAPON_VALID0x937C71165CF334B3

The GTA V native IS_WEAPON_VALID of the WEAPON namespace, as LS:MP client scripts call it: the global function isWeaponValid, in JavaScript and in Lua.

SignatureJavaScript
isWeaponValid(weaponHash: Hash): boolean
SignatureLua
isWeaponValid(weaponHash: Hash): boolean

Usage

JavaScript
const result = isWeaponValid(weaponHash);
Lua
local result = isWeaponValid(weaponHash)

Parameters

ParameterTypeJavaScriptLua
weaponHashHashnumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Reference

Namespace
Weapon WEAPON
In the game
BOOL IS_WEAPON_VALID(Hash weaponHash)
Hash
0x937C71165CF334B3

Open in the interactive natives reference