getBestPedWeapon
GET_BEST_PED_WEAPON0x8483E98E8B888AE2The GTA V native GET_BEST_PED_WEAPON of the WEAPON namespace, as LS:MP client scripts call it: the global function getBestPedWeapon, in JavaScript and in Lua.
getBestPedWeapon(ped: Ped, bIgnoreAmmoCheck: boolean): HashgetBestPedWeapon(ped: Ped, bIgnoreAmmoCheck: boolean): HashUsage
JavaScript
const hash = getBestPedWeapon(ped, bIgnoreAmmoCheck);Lua
local hash = getBestPedWeapon(ped, bIgnoreAmmoCheck)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
bIgnoreAmmoCheck | BOOL | boolean | boolean |
Returns
Hash JavaScript number, Lua integerA game hash. Natives return it unsigned (0 to 4294967295), the value lsmp.hash gives. As an argument, the signed and unsigned forms of a hash are the same value.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
bIgnoreAmmoCheck is always false in the scripts.
Reference
- Namespace
- Weapon WEAPON
- In the game
Hash GET_BEST_PED_WEAPON(Ped ped, BOOL bIgnoreAmmoCheck)- Hash
0x8483E98E8B888AE2