WeaponClient

doesWeaponTakeWeaponComponent

DOES_WEAPON_TAKE_WEAPON_COMPONENT0x5CEE3DF569CECAB0

The GTA V native DOES_WEAPON_TAKE_WEAPON_COMPONENT of the WEAPON namespace, as LS:MP client scripts call it: the global function doesWeaponTakeWeaponComponent, in JavaScript and in Lua.

SignatureJavaScript
doesWeaponTakeWeaponComponent(weaponHash: Hash, componentHash: Hash): boolean
SignatureLua
doesWeaponTakeWeaponComponent(weaponHash: Hash, componentHash: Hash): boolean

Usage

JavaScript
const result = doesWeaponTakeWeaponComponent(weaponHash, componentHash);
Lua
local result = doesWeaponTakeWeaponComponent(weaponHash, componentHash)

Parameters

ParameterTypeJavaScriptLua
weaponHashHashnumberinteger
componentHashHashnumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

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
BOOL DOES_WEAPON_TAKE_WEAPON_COMPONENT(Hash weaponHash, Hash componentHash)
Hash
0x5CEE3DF569CECAB0

Open in the interactive natives reference