GET_AMMO_IN_CLIP
Writes the number of rounds in the clip of the ped's weapon weaponHash to ammo. Returns true on success.
Signature
BOOL GET_AMMO_IN_CLIP(Ped ped, int* ammo, Hash weaponHash); // 0x2E1202248937775C b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | ped | Ped |
| 2 | ammo | int* (out pointer) |
| 3 | weaponHash | Hash |
Facts
| 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.
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
-- ...
endconst [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) {
// ...
}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>();Related WEAPON natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.