Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Bullet Colored

I'm retired, I'm already
Banned
Joined
Oct 3, 2011
Messages
832
Reaction score
155
Hi, here's a little contribution from me because I'm not petty and I won't be, so let's start!

The bullet bar is not included but according to what I have been told that this bullet bar is published somewhere who knows where but it is for the current and maximum amount of bullets that it prints.

Like this image example here.

mMVqkf - Bullet Colored - RaGEZONE Forums


Note: I already had this idea raised a while ago because I saw it in another video game.

search these in ZCombatInterface.cpp
PHP:
	MMatchCharItemParts nParts = pCharacter->GetItems()->GetSelectedWeaponParts();
	if (nParts != MMCIP_MELEE && nParts < MMCIP_END)
	{
		sprintf(buffer, "%d / %d", m_nBulletCurrMagazine, m_nBulletSpare);
		TextRelative(pDC, 720.f / 800.f, 585.f / 600.f, buffer);
	}

replace to
PHP:
	MMatchCharItemParts nParts = pCharacter->GetItems()->GetSelectedWeaponParts();
	if (nParts != MMCIP_MELEE && nParts < MMCIP_END)
	{
		float ColorBullet = (float)m_nBulletCurrMagazine / (float)pCharacter->GetStatus().Ref().nMaxCurrBullet * 100;
		float ColorBullet2 = 0.10 * m_nBulletCurrMagazine / pCharacter->GetStatus().Ref().nMaxCurrBullet;
		if (ColorBullet == 60 || ColorBullet == 55 || ColorBullet >= 45)
			pDC->SetColor(MCOLOR(0xFFFFFFFF));
		else if (ColorBullet >= 35)
			pDC->SetColor(MCOLOR(0xFFFFF000));
		else if (ColorBullet >= 25)
			pDC->SetColor(MCOLOR(0xFFFFF000));
		else if (ColorBullet >= 15)
			pDC->SetColor(MCOLOR(0xFFFF0000));
		else if (ColorBullet >= 5)
			pDC->SetColor(MCOLOR(0xFFFF0000));
		else if (ColorBullet >= 2)
			pDC->SetColor(MCOLOR(0xFFFF0000));
		else if (ColorBullet >= 0)
			pDC->SetColor(MCOLOR(0xFFFF0000));
		else
			pDC->SetColor(MCOLOR(0xFFFFFFFF));
		pDC->FillRectangle((MGetWorkspaceWidth()), MGetWorkspaceHeight(), ColorBullet2 * MGetWorkspaceWidth(), 0);

		sprintf(buffer, "%d / %d", m_nBulletCurrMagazine, m_nBulletSpare);
		TextRelative(pDC, 720.f / 800.f, 585.f / 600.f, buffer);
	}

I forgot to tell you that declare nMaxCurrBullet in ZCharacter for "struct ZCharacterStatus"
example
PHP:
int nMaxCurrBullet
PHP:
nMaxCurrBullet(0),
If you have a better idea do not hesitate to share it in your comment. (It's not mandatory)

Credits: Jorklenis2 (Me)
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Aug 8, 2012
Messages
19
Reaction score
0
Hi, here's a little contribution from me because I'm not petty and I won't be, so let's start!

The bullet bar is not included but according to what I have been told that this bullet bar is published somewhere who knows where but it is for the current and maximum amount of bullets that it prints.

Like this image example here.

mMVqkf - Bullet Colored - RaGEZONE Forums


Note: I already had this idea raised a while ago because I saw it in another video game.

search these in ZCombatInterface.cpp
PHP:
	MMatchCharItemParts nParts = pCharacter->GetItems()->GetSelectedWeaponParts();
	if (nParts != MMCIP_MELEE && nParts < MMCIP_END)
	{
		sprintf(buffer, "%d / %d", m_nBulletCurrMagazine, m_nBulletSpare);
		TextRelative(pDC, 720.f / 800.f, 585.f / 600.f, buffer);
	}

replace to
PHP:
	MMatchCharItemParts nParts = pCharacter->GetItems()->GetSelectedWeaponParts();
	if (nParts != MMCIP_MELEE && nParts < MMCIP_END)
	{
		float ColorBullet = (float)m_nBulletCurrMagazine / (float)pCharacter->GetStatus().Ref().nMaxCurrBullet * 100;
		float ColorBullet2 = 0.10 * m_nBulletCurrMagazine / pCharacter->GetStatus().Ref().nMaxCurrBullet;
		if (ColorBullet == 60 || ColorBullet == 55 || ColorBullet >= 45)
			pDC->SetColor(MCOLOR(0xFFFFFFFF));
		else if (ColorBullet >= 35)
			pDC->SetColor(MCOLOR(0xFFFFF000));
		else if (ColorBullet >= 25)
			pDC->SetColor(MCOLOR(0xFFFFF000));
		else if (ColorBullet >= 15)
			pDC->SetColor(MCOLOR(0xFFFF0000));
		else if (ColorBullet >= 5)
			pDC->SetColor(MCOLOR(0xFFFF0000));
		else if (ColorBullet >= 2)
			pDC->SetColor(MCOLOR(0xFFFF0000));
		else if (ColorBullet >= 0)
			pDC->SetColor(MCOLOR(0xFFFF0000));
		else
			pDC->SetColor(MCOLOR(0xFFFFFFFF));
		pDC->FillRectangle((MGetWorkspaceWidth()), MGetWorkspaceHeight(), ColorBullet2 * MGetWorkspaceWidth(), 0);

		sprintf(buffer, "%d / %d", m_nBulletCurrMagazine, m_nBulletSpare);
		TextRelative(pDC, 720.f / 800.f, 585.f / 600.f, buffer);
	}

I forgot to tell you that declare nMaxCurrBullet in ZCharacter for "struct ZCharacterStatus"
example
PHP:
int nMaxCurrBullet
PHP:
nMaxCurrBullet(0),
If you have a better idea do not hesitate to share it in your comment. (It's not mandatory)

Credits: Jorklenis2 (Me)

No me funciona.... - it doesn't work for me
 

Attachments

You must be registered for see attachments list
Junior Spellweaver
Joined
Apr 23, 2021
Messages
106
Reaction score
15
gunz needs also different fonts tested... thanks adding this, should be easy to use. expect for those who are here only to copy paste direct-on.
 
Back
Top