The Lab
WEAPON native

GET_AMMO_IN_CLIP

returns BOOL3 paramsbuild 1207

Writes the number of rounds in the clip of the ped's weapon weaponHash to ammo. Returns true on success.

Signature

C
BOOL GET_AMMO_IN_CLIP(Ped ped, int* ammo, Hash weaponHash); // 0x2E1202248937775C b1207

Parameters

#NameType
1pedPed
2ammoint* (out pointer)
3weaponHashHash

Facts

Facts about GET_AMMO_IN_CLIP
Name
GET_AMMO_IN_CLIP
Hash
0x2E1202248937775C
Namespace
Returns
BOOL
Game build
1207

Examples

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

Lua
local result, ammo = Citizen.InvokeNative(0x2E1202248937775C, -- GET_AMMO_IN_CLIP
  PlayerPedId(), -- Ped ped
  Citizen.PointerValueInt(), -- int* ammo
  GetHashKey("weapon_revolver_cattleman"), -- Hash weaponHash
  Citizen.ReturnResultAnyway()
)
if result then
  -- ...
end
JavaScript
const [result, ammo] = Citizen.invokeNative("0x2E1202248937775C", // GET_AMMO_IN_CLIP
  PlayerPedId(), // Ped ped
  Citizen.pointerValueInt(), // int* ammo
  GetHashKey("weapon_revolver_cattleman"), // Hash weaponHash
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
var ammoArg = new OutputArgument();
bool result = Function.Call<bool>((Hash)0x2E1202248937775C, // GET_AMMO_IN_CLIP
  API.PlayerPedId(), // Ped ped
  ammoArg, // int* ammo
  (uint)API.GetHashKey("weapon_revolver_cattleman") // Hash weaponHash
);
int ammo = ammoArg.GetResult<int>();
All WEAPON natives

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