GET_PED_AMMO_TYPE_FROM_WEAPON
Returns the current ammo type of the specified ped's specified weapon.
Hash
0x7FEAD38B326B9F74Runtime name
GetPedAmmoTypeFromWeaponNamespaceWEAPON
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x7FEAD38B326B9F74Signature
Hash GET_PED_AMMO_TYPE_FROM_WEAPON(Ped ped, Hash weaponHash);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
weaponHash | Hash | — |
Returns Hash
Description
Returns the current ammo type of the specified ped's specified weapon.
Usage
local retval = GetPedAmmoTypeFromWeapon(ped, weaponHash)
-- always works, by hash
local retval = Citizen.InvokeNative(0x7FEAD38B326B9F74, ped, weaponHash, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetPedAmmoTypeFromWeapon(ped, weaponHash);
// by hash
const retval = Citizen.invokeNative('0x7FEAD38B326B9F74', ped, weaponHash, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0x7FEAD38B326B9F74, ped, weaponHash);- Hash parameters: the named function also accepts a string and hashes it for you;
Citizen.InvokeNativeneeds the number — passjoaat("name")or a backtick literal like`name`.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.