The Lab
WEAPON native

GET_AMMO_IN_PED_WEAPON

returns int2 paramsbuild 1207

Returns the total ammo the ped has for the weapon weaponHash.

Signature

C
int GET_AMMO_IN_PED_WEAPON(Ped ped, Hash weaponHash); // 0x015A522136D7F951 b1207

Parameters

#NameType
1pedPed
2weaponHashHash

Facts

Facts about GET_AMMO_IN_PED_WEAPON
Name
GET_AMMO_IN_PED_WEAPON
Hash
0x015A522136D7F951
Namespace
Returns
int
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result = Citizen.InvokeNative(0x015A522136D7F951, -- GET_AMMO_IN_PED_WEAPON
  PlayerPedId(), -- Ped ped
  GetHashKey("weapon_revolver_cattleman"), -- Hash weaponHash
  Citizen.ResultAsInteger()
)
print(result)
JavaScript
const result = Citizen.invokeNative("0x015A522136D7F951", // GET_AMMO_IN_PED_WEAPON
  PlayerPedId(), // Ped ped
  GetHashKey("weapon_revolver_cattleman"), // Hash weaponHash
  Citizen.resultAsInteger()
);
console.log(result)
C#
int result = Function.Call<int>((Hash)0x015A522136D7F951, // GET_AMMO_IN_PED_WEAPON
  API.PlayerPedId(), // Ped ped
  (uint)API.GetHashKey("weapon_revolver_cattleman") // Hash weaponHash
);
All WEAPON natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.