Ammo types

Hey there guys,

I’ve been working on a script and I need to get the current ped ammo type in weapon.
I can get the normal ammo type but i’m using differents kind of ammo.

For example, i’m using a lancaster with express ammo
Here is my client script :

  local ammoType = GetPedAmmoTypeFromWeapon(PlayerPedId(), currentWeaponHash)
    print(ammoType, GetHashKey("AMMO_REPEATER_EXPRESS"), GetHashKey("AMMO_REPEATER"))

And here is my print : -1330115686 -578347576 -1330115686

But in game i’m actually have express ammo equipped. Does anyone knows how to get the real current ammo and not just the normal ones ? Or did I miss a parameter ?

Are you sure currentWeaponHash is correct?

This worked for me:

local weaponObj = GetCurrentPedWeaponEntityIndex(ped, 0)

if DoesEntityExist(weaponObj) then
    local _, primaryWeaponHash = GetCurrentPedWeapon(ped, true, 0, false)
    local ammoType = GetCurrentPedWeaponAmmoType(ped, weaponObj)
end