_GET_AMMO_IN_CLIP_BY_INVENTORY_UID
Writes the ammo count in the clip of the weapon identified by its inventory UID to ammo. Returns true on success.
Signature
BOOL _GET_AMMO_IN_CLIP_BY_INVENTORY_UID(Ped ped, int* ammo, Any* inventoryUid); // 0x678F00858980F516 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | ped | Ped |
| 2 | ammo | int* (out pointer) |
| 3 | inventoryUid | Any* (out pointer) |
Facts
| 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.
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
-- ...
endconst [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) {
// ...
}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>();Related WEAPON natives
- _GET_AMMO_IN_PED_WEAPON_FROM_GUID
- GET_AMMO_IN_CLIP
- GET_MAX_AMMO_IN_CLIP
- _GET_BEST_PED_WEAPON_IN_INVENTORY
- _GET_AMMO_RECOMMENDED_TYPE_FOR_WEAPON
- _GET_AMMO_TYPE_FOR_WEAPON
- _REFILL_AMMO_IN_CLIP
- GET_AMMO_IN_PED_WEAPON
- GET_PED_AMMO_BY_TYPE
- SET_AMMO_IN_CLIP
- _GET_BEST_PED_WEAPON_IN_GROUP
- _GET_CURRENT_AMMO_TYPE_FROM_GUID
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.