RedM Natives

_GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT

Hash0x1A47699E8D533E8F
Runtime nameGiveWeaponComponentToWeaponObject
NamespaceWEAPON
SideClient
NameCommunity guess
Docs
Since build1207

Signature

void _GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT(Object* weaponObject, Ped ped, Hash componentHash, BOOL p3);

Parameters

NameTypeDescription
weaponObjectObject*—
pedPed—
componentHashHash—
p3BOOL—

Returns void

Usage

Lua
local weaponObject = GiveWeaponComponentToWeaponObject(ped, componentHash, p3)

-- always works, by hash
local weaponObject = Citizen.InvokeNative(0x1A47699E8D533E8F, Citizen.PointerValueInt(), ped, componentHash, p3)
JavaScript and C#
JavaScript
const weaponObject = GiveWeaponComponentToWeaponObject(ped, componentHash, p3);

// by hash
const weaponObject = Citizen.invokeNative('0x1A47699E8D533E8F', Citizen.pointerValueInt(), ped, componentHash, p3);
C#
var weaponObject = new OutputArgument();
Function.Call((Hash)0x1A47699E8D533E8F, weaponObject, ped, componentHash, p3);
// weaponObject.GetResult<int>()
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("name") or a backtick literal like `name`.
  • Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
  • The name is a community guess and may change. If the named call is missing in your client build, use InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.