GET_AMMO_IN_PED_WEAPON
Returns the total ammo the ped has for the weapon weaponHash.
Signature
int GET_AMMO_IN_PED_WEAPON(Ped ped, Hash weaponHash); // 0x015A522136D7F951 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | ped | Ped |
| 2 | weaponHash | Hash |
Facts
| 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.
local result = Citizen.InvokeNative(0x015A522136D7F951, -- GET_AMMO_IN_PED_WEAPON
PlayerPedId(), -- Ped ped
GetHashKey("weapon_revolver_cattleman"), -- Hash weaponHash
Citizen.ResultAsInteger()
)
print(result)const result = Citizen.invokeNative("0x015A522136D7F951", // GET_AMMO_IN_PED_WEAPON
PlayerPedId(), // Ped ped
GetHashKey("weapon_revolver_cattleman"), // Hash weaponHash
Citizen.resultAsInteger()
);
console.log(result)int result = Function.Call<int>((Hash)0x015A522136D7F951, // GET_AMMO_IN_PED_WEAPON
API.PlayerPedId(), // Ped ped
(uint)API.GetHashKey("weapon_revolver_cattleman") // Hash weaponHash
);Related WEAPON natives
- _GET_AMMO_IN_PED_WEAPON_FROM_GUID
- GET_AMMO_IN_CLIP
- GET_PED_AMMO_TYPE_FROM_WEAPON
- _GET_BEST_PED_WEAPON_IN_GROUP
- _GET_BEST_PED_WEAPON_IN_INVENTORY
- _GET_CURRENT_PED_WEAPON_AMMO_TYPE
- _GET_PED_WEAPON_IN_SLOT
- _GET_WEAPON_FROM_DEFAULT_PED_WEAPON_COLLECTION
- _REFILL_AMMO_IN_CURRENT_PED_WEAPON
- GET_BEST_PED_WEAPON
- GET_CURRENT_PED_VEHICLE_WEAPON
- GET_CURRENT_PED_WEAPON
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.