RedM Natives

GIVE_WEAPON_COMPONENT_TO_PED

GIVE_WEAPON_COMPONENT_TO_PED This is the server-side RPC native equivalent of the client native GIVE_WEAPON_COMPONENT_TO_PED.

Hash0x3E1E286D
Runtime nameGiveWeaponComponentToPed
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

void GIVE_WEAPON_COMPONENT_TO_PED(Ped ped, Hash weaponHash, Hash componentHash);

Parameters

NameTypeDescription
pedPed—
weaponHashHash—
componentHashHash—

Returns void

Description

Cfx.re native reference

GIVE_WEAPON_COMPONENT_TO_PED

This is the server-side RPC native equivalent of the client native GIVE_WEAPON_COMPONENT_TO_PED.

Usage

Lua
GiveWeaponComponentToPed(ped, weaponHash, componentHash)

-- always works, by hash
Citizen.InvokeNative(0x3e1e286d, ped, weaponHash, componentHash)
JavaScript and C#
JavaScript
GiveWeaponComponentToPed(ped, weaponHash, componentHash);

// by hash
Citizen.invokeNative('0x3e1e286d', ped, weaponHash, componentHash);
C#
Function.Call((Hash)0x3e1e286d, ped, weaponHash, componentHash);
  • 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`.

Sources

Cfx.re native reference

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