isWeaponValid
IS_WEAPON_VALID0x937C71165CF334B3The 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.
isWeaponValid(weaponHash: Hash): booleanisWeaponValid(weaponHash: Hash): booleanUsage
JavaScript
const result = isWeaponValid(weaponHash);Lua
local result = isWeaponValid(weaponHash)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
weaponHash | Hash | number | integer |
Returns
BOOL JavaScript boolean, Lua booleanNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
Reference
- Namespace
- Weapon WEAPON
- In the game
BOOL IS_WEAPON_VALID(Hash weaponHash)- Hash
0x937C71165CF334B3