getMaxAmmoInClip
GET_MAX_AMMO_IN_CLIP0xA38DCFFCEA8962FAThe GTA V native GET_MAX_AMMO_IN_CLIP of the WEAPON namespace, as LS:MP client scripts call it: the global function getMaxAmmoInClip, in JavaScript and in Lua.
getMaxAmmoInClip(ped: Ped, weaponHash: Hash, p2: boolean): numbergetMaxAmmoInClip(ped: Ped, weaponHash: Hash, p2: boolean): integerUsage
JavaScript
const result = getMaxAmmoInClip(ped, weaponHash, p2);Lua
local result = getMaxAmmoInClip(ped, weaponHash, p2)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
weaponHash | Hash | number | integer |
p2 | BOOL | boolean | boolean |
Returns
int JavaScript number, Lua integerNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
p2 is mostly 1 in the scripts.
Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
Reference
- Namespace
- Weapon WEAPON
- In the game
int GET_MAX_AMMO_IN_CLIP(Ped ped, Hash weaponHash, BOOL p2)- Hash
0xA38DCFFCEA8962FA