HAS_WEAPON_GOT_WEAPON_COMPONENT
Returns true if the weapon object has the component addonHash.
Signature
BOOL HAS_WEAPON_GOT_WEAPON_COMPONENT(Object weapon, Hash addonHash); // 0x76A18844E743BF91 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | weapon | Object |
| 2 | addonHash | Hash |
Facts
| 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.
local result = Citizen.InvokeNative(0x76A18844E743BF91, -- HAS_WEAPON_GOT_WEAPON_COMPONENT
0, -- Object weapon
GetHashKey("name") -- Hash addonHash
)
if result then
-- ...
endconst result = Citizen.invokeNative("0x76A18844E743BF91", // HAS_WEAPON_GOT_WEAPON_COMPONENT
0, // Object weapon
GetHashKey("name"), // Hash addonHash
Citizen.returnResultAnyway()
);
if (result) {
// ...
}bool result = Function.Call<bool>((Hash)0x76A18844E743BF91, // HAS_WEAPON_GOT_WEAPON_COMPONENT
0, // Object weapon
(uint)API.GetHashKey("name") // Hash addonHash
);Related WEAPON natives
- _HAS_PED_GOT_WEAPON_COMPONENT
- HAS_PED_GOT_WEAPON
- _GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT
- REMOVE_WEAPON_COMPONENT_FROM_WEAPON_OBJECT
- _GET_WEAPON_COMPONENT_TYPE_MODEL
- _GET_WEAPON_FROM_DEFAULT_PED_WEAPON_COLLECTION
- _GET_WEAPON_GUN_SPINNING_WEAPON_EMOTE_TRICK_TYPE_HASH
- _GET_WEAPON_HAS_MULTIPLE_AMMO_TYPES
- _GIVE_WEAPON_COMPONENT_TO_ENTITY
- _HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON
- _HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON_RECENTLY
- _HAS_WEAPON_ASSET_LOADED
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.