giveWeaponComponentToPed
GIVE_WEAPON_COMPONENT_TO_PED0xD966D51AA5B28BB9The GTA V native GIVE_WEAPON_COMPONENT_TO_PED of the WEAPON namespace, as LS:MP client scripts call it: the global function giveWeaponComponentToPed, in JavaScript and in Lua.
giveWeaponComponentToPed(
ped: Ped,
weaponHash: Hash,
componentHash: Hash
): voidgiveWeaponComponentToPed(ped: Ped, weaponHash: Hash, componentHash: Hash)Usage
JavaScript
giveWeaponComponentToPed(ped, weaponHash, componentHash);Lua
giveWeaponComponentToPed(ped, weaponHash, componentHash)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
weaponHash | Hash | number | integer |
componentHash | Hash | number | integer |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Full list of weapons & components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
Reference
- Namespace
- Weapon WEAPON
- In the game
void GIVE_WEAPON_COMPONENT_TO_PED(Ped ped, Hash weaponHash, Hash componentHash)- Hash
0xD966D51AA5B28BB9