hasWeaponGotWeaponComponent
HAS_WEAPON_GOT_WEAPON_COMPONENT0x76A18844E743BF91The GTA V native HAS_WEAPON_GOT_WEAPON_COMPONENT of the WEAPON namespace, as LS:MP client scripts call it: the global function hasWeaponGotWeaponComponent, in JavaScript and in Lua.
hasWeaponGotWeaponComponent(weapon: Object, componentHash: Hash): booleanhasWeaponGotWeaponComponent(weapon: Object, componentHash: Hash): booleanUsage
JavaScript
const result = hasWeaponGotWeaponComponent(weapon, componentHash);Lua
local result = hasWeaponGotWeaponComponent(weapon, componentHash)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
weapon | Object | number | integer |
componentHash | 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.
see doesWeaponTakeWeaponComponent for full list of weapons & components
Reference
- Namespace
- Weapon WEAPON
- In the game
BOOL HAS_WEAPON_GOT_WEAPON_COMPONENT(Object weapon, Hash componentHash)- Hash
0x76A18844E743BF91