getPedAmmoByType
GET_PED_AMMO_BY_TYPE0x39D22031557946C1The GTA V native GET_PED_AMMO_BY_TYPE of the WEAPON namespace, as LS:MP client scripts call it: the global function getPedAmmoByType, in JavaScript and in Lua.
getPedAmmoByType(ped: Ped, ammoTypeHash: Hash): numbergetPedAmmoByType(ped: Ped, ammoTypeHash: Hash): integerUsage
JavaScript
const result = getPedAmmoByType(ped, ammoTypeHash);Lua
local result = getPedAmmoByType(ped, ammoTypeHash)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
ammoTypeHash | Hash | number | integer |
Returns
int JavaScript number, Lua integerReference
- Namespace
- Weapon WEAPON
- In the game
int GET_PED_AMMO_BY_TYPE(Ped ped, Hash ammoTypeHash)- Hash
0x39D22031557946C1