GET_PED_AMMO_BY_TYPE
Returns how much ammo of type ammoType the ped has.
Signature
int GET_PED_AMMO_BY_TYPE(Ped ped, Hash ammoType); // 0x39D22031557946C1 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | ped | Ped |
| 2 | ammoType | Hash |
Facts
| Name | GET_PED_AMMO_BY_TYPE |
|---|---|
| Hash | 0x39D22031557946C1 |
| 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(0x39D22031557946C1, -- GET_PED_AMMO_BY_TYPE
PlayerPedId(), -- Ped ped
GetHashKey("name"), -- Hash ammoType
Citizen.ResultAsInteger()
)
print(result)const result = Citizen.invokeNative("0x39D22031557946C1", // GET_PED_AMMO_BY_TYPE
PlayerPedId(), // Ped ped
GetHashKey("name"), // Hash ammoType
Citizen.resultAsInteger()
);
console.log(result)int result = Function.Call<int>((Hash)0x39D22031557946C1, // GET_PED_AMMO_BY_TYPE
API.PlayerPedId(), // Ped ped
(uint)API.GetHashKey("name") // Hash ammoType
);Related WEAPON natives
- GET_PED_AMMO_TYPE_FROM_WEAPON
- _ADD_AMMO_TO_PED_BY_TYPE
- _GET_CURRENT_PED_WEAPON_AMMO_TYPE
- _GET_WEAPON_TYPE_FROM_AMMO_TYPE
- _REMOVE_AMMO_FROM_PED_BY_TYPE
- SET_PED_AMMO_BY_TYPE
- GET_AMMO_IN_PED_WEAPON
- _DISABLE_AMMO_TYPE_FOR_PED
- _DISABLE_AMMO_TYPE_FOR_PED_WEAPON
- _ENABLE_AMMO_TYPE_FOR_PED
- _ENABLE_AMMO_TYPE_FOR_PED_WEAPON
- _EXPLODE_PED_AMMO_TYPE
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.