RedM Natives

GET_AMMO_IN_PED_WEAPON

Hash0x015A522136D7F951
Runtime nameGetAmmoInPedWeapon
NamespaceWEAPON
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x015A522136D7F951

Signature

int GET_AMMO_IN_PED_WEAPON(Ped ped, Hash weaponHash);

Parameters

NameTypeDescription
pedPed—
weaponHashHash—

Returns int

Usage

Lua
local retval = GetAmmoInPedWeapon(ped, weaponHash)

-- always works, by hash
local retval = Citizen.InvokeNative(0x015A522136D7F951, ped, weaponHash, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetAmmoInPedWeapon(ped, weaponHash);

// by hash
const retval = Citizen.invokeNative('0x015A522136D7F951', ped, weaponHash, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x015A522136D7F951, ped, weaponHash);
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("name") or a backtick literal like `name`.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.