getCurrentPedWeaponEntityIndex
GET_CURRENT_PED_WEAPON_ENTITY_INDEX0x3B390A939AF0B5FCThe GTA V native GET_CURRENT_PED_WEAPON_ENTITY_INDEX of the WEAPON namespace, as LS:MP client scripts call it: the global function getCurrentPedWeaponEntityIndex, in JavaScript and in Lua.
getCurrentPedWeaponEntityIndex(ped: Ped, p1: any): EntitygetCurrentPedWeaponEntityIndex(ped: Ped, p1: any): EntityUsage
JavaScript
const entity = getCurrentPedWeaponEntityIndex(ped, p1);Lua
local entity = getCurrentPedWeaponEntityIndex(ped, p1)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
p1 | Any | any | any |
Returns
Entity JavaScript number, Lua integerGame handle of an entity: a ped, a vehicle or an object. Not an LS:MP netId. Convert one with lsmp.getEntityFromNetId.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
doDeadCheck does nothing in release builds.
Reference
- Namespace
- Weapon WEAPON
- In the game
Entity GET_CURRENT_PED_WEAPON_ENTITY_INDEX(Ped ped, Any p1)- Hash
0x3B390A939AF0B5FC