The Lab
WEAPON native

HAS_WEAPON_GOT_WEAPON_COMPONENT

returns BOOL2 paramsbuild 1207

Returns true if the weapon object has the component addonHash.

Signature

C
BOOL HAS_WEAPON_GOT_WEAPON_COMPONENT(Object weapon, Hash addonHash); // 0x76A18844E743BF91 b1207

Parameters

#NameType
1weaponObject
2addonHashHash

Facts

Facts about HAS_WEAPON_GOT_WEAPON_COMPONENT
Name
HAS_WEAPON_GOT_WEAPON_COMPONENT
Hash
0x76A18844E743BF91
Namespace
Returns
BOOL
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result = Citizen.InvokeNative(0x76A18844E743BF91, -- HAS_WEAPON_GOT_WEAPON_COMPONENT
  0, -- Object weapon
  GetHashKey("name") -- Hash addonHash
)
if result then
  -- ...
end
JavaScript
const result = Citizen.invokeNative("0x76A18844E743BF91", // HAS_WEAPON_GOT_WEAPON_COMPONENT
  0, // Object weapon
  GetHashKey("name"), // Hash addonHash
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
bool result = Function.Call<bool>((Hash)0x76A18844E743BF91, // HAS_WEAPON_GOT_WEAPON_COMPONENT
  0, // Object weapon
  (uint)API.GetHashKey("name") // Hash addonHash
);
All WEAPON natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.