isPedWeaponComponentActive
IS_PED_WEAPON_COMPONENT_ACTIVE0x0D78DE0572D3969EThe GTA V native IS_PED_WEAPON_COMPONENT_ACTIVE of the WEAPON namespace, as LS:MP client scripts call it: the global function isPedWeaponComponentActive, in JavaScript and in Lua.
isPedWeaponComponentActive(
ped: Ped,
weaponHash: Hash,
componentHash: Hash
): booleanisPedWeaponComponentActive(
ped: Ped,
weaponHash: Hash,
componentHash: Hash
): booleanUsage
JavaScript
const result = isPedWeaponComponentActive(ped, weaponHash, componentHash);Lua
local result = isPedWeaponComponentActive(ped, weaponHash, componentHash)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
weaponHash | Hash | number | integer |
componentHash | Hash | number | integer |
Returns
BOOL JavaScript boolean, Lua booleanNotes
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 IS_PED_WEAPON_COMPONENT_ACTIVE(Ped ped, Hash weaponHash, Hash componentHash)- Hash
0x0D78DE0572D3969E