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.
Signature
void GIVE_WEAPON_COMPONENT_TO_PED(Ped ped, Hash weaponHash, Hash componentHash);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
weaponHash | Hash | — |
componentHash | Hash | — |
Returns void
Description
This is the server-side RPC native equivalent of the client native GIVE_WEAPON_COMPONENT_TO_PED.
Usage
GiveWeaponComponentToPed(ped, weaponHash, componentHash)
-- always works, by hash
Citizen.InvokeNative(0x3e1e286d, ped, weaponHash, componentHash)JavaScript and C#
GiveWeaponComponentToPed(ped, weaponHash, componentHash);
// by hash
Citizen.invokeNative('0x3e1e286d', ped, weaponHash, componentHash);Function.Call((Hash)0x3e1e286d, ped, weaponHash, componentHash);- 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`.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.