The Lab
WEAPON native

_GET_AMMO_IN_CLIP_BY_INVENTORY_UID

returns BOOL3 paramsbuild 1207

Writes the ammo count in the clip of the weapon identified by its inventory UID to ammo. Returns true on success.

Signature

C
BOOL _GET_AMMO_IN_CLIP_BY_INVENTORY_UID(Ped ped, int* ammo, Any* inventoryUid); // 0x678F00858980F516 b1207

Parameters

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

Facts

Facts about _GET_AMMO_IN_CLIP_BY_INVENTORY_UID
Name
_GET_AMMO_IN_CLIP_BY_INVENTORY_UID
Hash
0x678F00858980F516
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, inventoryUid = Citizen.InvokeNative(0x678F00858980F516, -- _GET_AMMO_IN_CLIP_BY_INVENTORY_UID
  PlayerPedId(), -- Ped ped
  Citizen.PointerValueInt(), -- int* ammo
  Citizen.PointerValueInt(), -- Any* inventoryUid
  Citizen.ReturnResultAnyway()
)
if result then
  -- ...
end
JavaScript
const [result, ammo, inventoryUid] = Citizen.invokeNative("0x678F00858980F516", // _GET_AMMO_IN_CLIP_BY_INVENTORY_UID
  PlayerPedId(), // Ped ped
  Citizen.pointerValueInt(), // int* ammo
  Citizen.pointerValueInt(), // Any* inventoryUid
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
var ammoArg = new OutputArgument();
var inventoryUidArg = new OutputArgument();
bool result = Function.Call<bool>((Hash)0x678F00858980F516, // _GET_AMMO_IN_CLIP_BY_INVENTORY_UID
  API.PlayerPedId(), // Ped ped
  ammoArg, // int* ammo
  inventoryUidArg // Any* inventoryUid
);
int ammo = ammoArg.GetResult<int>();
int inventoryUid = inventoryUidArg.GetResult<int>();
All WEAPON natives

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