giveWeaponComponentToWeaponObject
GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT0x33E179436C0B31DBThe GTA V native GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT of the WEAPON namespace, as LS:MP client scripts call it: the global function giveWeaponComponentToWeaponObject, in JavaScript and in Lua.
giveWeaponComponentToWeaponObject(
weaponObject: Object,
componentHash: Hash
): voidgiveWeaponComponentToWeaponObject(weaponObject: Object, componentHash: Hash)Usage
JavaScript
giveWeaponComponentToWeaponObject(weaponObject, componentHash);Lua
giveWeaponComponentToWeaponObject(weaponObject, componentHash)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
weaponObject | Object | 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.
componentHash:
(use getWeaponComponentTypeModel() to get hash value)
${component_at_ar_flsh}, ${component_at_ar_supp}, ${component_at_pi_flsh}, ${component_at_scope_large}, ${component_at_ar_supp_02}
Reference
- Namespace
- Weapon WEAPON
- In the game
void GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT(Object weaponObject, Hash componentHash)- Hash
0x33E179436C0B31DB