ZCombatInterface.cpp in bool ZCombatInterface::OnCreate() add these
´
Code:
m_AmmoCount = new MBitmapR2;
if (!m_AmmoCount->Create("AmmoBar", RGetDevice(), "Interface/default/loading/loading.bmp"))
{
mlog("Error creating ammo bar\n");
}
in void ZCombatInterface::OnDestroy() add
Code:
if (m_AmmoCount != nullptr)
{
delete m_AmmoCount;
m_AmmoCount = nullptr;
}
in void ZCombatInterface::DrawMyWeaponPont(MDrawContext* pDC) ebelow of MMatchCharItemParts nParts = pCharacter->GetItems()->GetSelectedWeaponParts();
Code:
if (nParts != MMCIP_MELEE && nParts < MMCIP_END)
{
// meleeÀ϶§´Â ź¾Ë¼ö Ç¥½Ã¸¦ ÇÏÁö ¾Ê´Â´Ù.
float width = static_cast<float>(pCharacter->GetItems()->GetSelectedWeapon()->GetBulletCurrMagazine()) /
static_cast<float>(pCharacter->GetItems()->GetSelectedWeapon()->GetDesc()->m_nMaxBullet.Ref());
BitmapRelative(pDC, 660.f / 800.f, 515.f / 600.f, width * 800.f, 16,m_AmmoCount->GetSourceBitmap());
sprintf(buffer, "%d / %d", m_nBulletCurrMagazine, m_nBulletSpare);
TextRelative(pDC, 720.f/800.f, 495.f/600.f, buffer);
}
This is in the Jetman code, it's not the same as mine but it will help you depending on how you want to do it, I don't know if it will work for certain weapons and if you want to add colors you won't be able to because this works with MBitmapR2.