_GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT
Adds the weapon component componentHash to the given weapon object.
Signature
void _GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT(Object* weaponObject, Ped ped, Hash componentHash, BOOL p3); // 0x1A47699E8D533E8F b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | weaponObject | Object* (out pointer) |
| 2 | ped | Ped |
| 3 | componentHash | Hash |
| 4 | p3 | BOOL |
Facts
| Name | _GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT |
|---|---|
| Hash | 0x1A47699E8D533E8F |
| Namespace | |
| Returns | void |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local weaponObject = Citizen.InvokeNative(0x1A47699E8D533E8F, -- _GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT
Citizen.PointerValueInt(), -- Object* weaponObject
PlayerPedId(), -- Ped ped
GetHashKey("name"), -- Hash componentHash
false -- BOOL p3
)
print(weaponObject)const weaponObject = Citizen.invokeNative("0x1A47699E8D533E8F", // _GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT
Citizen.pointerValueInt(), // Object* weaponObject
PlayerPedId(), // Ped ped
GetHashKey("name"), // Hash componentHash
false // BOOL p3
);
console.log(weaponObject)var weaponObjectArg = new OutputArgument();
Function.Call((Hash)0x1A47699E8D533E8F, // _GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT
weaponObjectArg, // Object* weaponObject
API.PlayerPedId(), // Ped ped
(uint)API.GetHashKey("name"), // Hash componentHash
false // BOOL p3
);
int weaponObject = weaponObjectArg.GetResult<int>();Related WEAPON natives
- _GIVE_WEAPON_COMPONENT_TO_ENTITY
- _GIVE_WEAPON_COLLECTION_TO_PED
- REMOVE_WEAPON_COMPONENT_FROM_WEAPON_OBJECT
- GIVE_DELAYED_WEAPON_TO_PED
- GIVE_WEAPON_TO_PED
- GIVE_WEAPON_TO_PED_WITH_OPTIONS
- HAS_WEAPON_GOT_WEAPON_COMPONENT
- _GET_PED_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_OBJECT_FROM_PED
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.