The Lab
WEAPON native

_GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT

returns void4 paramsbuild 1207

Adds the weapon component componentHash to the given weapon object.

Signature

C
void _GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT(Object* weaponObject, Ped ped, Hash componentHash, BOOL p3); // 0x1A47699E8D533E8F b1207

Parameters

#NameType
1weaponObjectObject* (out pointer)
2pedPed
3componentHashHash
4p3BOOL

Facts

Facts about _GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT
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.

Lua
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)
JavaScript
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)
C#
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>();
All WEAPON natives

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