_GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT
Hash
0x1A47699E8D533E8FRuntime name
GiveWeaponComponentToWeaponObjectNamespaceWEAPON
SideClient
NameCommunity guess
Docs
Since build1207
Signature
void _GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT(Object* weaponObject, Ped ped, Hash componentHash, BOOL p3);Parameters
| Name | Type | Description |
|---|---|---|
weaponObject | Object* | — |
ped | Ped | — |
componentHash | Hash | — |
p3 | BOOL | — |
Returns void
Usage
local weaponObject = GiveWeaponComponentToWeaponObject(ped, componentHash, p3)
-- always works, by hash
local weaponObject = Citizen.InvokeNative(0x1A47699E8D533E8F, Citizen.PointerValueInt(), ped, componentHash, p3)JavaScript and C#
const weaponObject = GiveWeaponComponentToWeaponObject(ped, componentHash, p3);
// by hash
const weaponObject = Citizen.invokeNative('0x1A47699E8D533E8F', Citizen.pointerValueInt(), ped, componentHash, p3);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.InvokeNativeneeds the number — passjoaat("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
InvokeNativewith the hash — it always works.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.