Weapon information in-game

Experienced Elementalist
Joined
Oct 14, 2015
Messages
293
Reaction score
86
Here it will show the Damage and the Delay of the weapon you are using showed only the damage so I added the Delay to make it more complete.

ZCombatInterface.cpp
Code:
char szWeaponInfo[70];
MMatchCharItemParts nParts = pCharacter->GetItems()->GetSelectedWeaponParts();
if (nParts < MMCIP_END) {
MMatchItemDesc* pItemDesc = MGetMatchItemDescMgr()->GetItemDesc(pCharacter->GetItems()->GetSelectedWeapon()->GetDescID());
sprintf(szWeaponInfo, "(Damage %d / Delay %d)", pItemDesc->m_nDamage.Ref(), pItemDesc->m_nDelay.Ref());
TextRelative(pDC, 00.f / 800.f, 00.f / 600.f, szWeaponInfo);
}


Credits: GZF Source and the min for updating. :laugh:
 

Attachments

You must be registered for see attachments list
Last edited:
I'm retired, I'm already
Banned
Joined
Oct 3, 2011
Messages
832
Reaction score
155
I already know what the liberation is due to hahaha
 
Banned
Banned
Joined
Aug 14, 2015
Messages
84
Reaction score
31
Which line should I put this? Thank you, quite new here sorry.
 
Experienced Elementalist
Joined
Oct 14, 2015
Messages
293
Reaction score
86

I dont know what I did wrong xD


Post some photos of the error so that we can help, without some information about the error there is no way to help you ^^.




I dont know what I did wrong xD


Post some photos of the error so that we can help, without some information about the error there is no way to help you ^^.
 
Junior Spellweaver
Joined
Apr 23, 2021
Messages
106
Reaction score
15
Code:
[COLOR=#000000]MCOLOR backgroundcolor;         if ( pCharacter->GetTeamID() == MMT_RED)             
backgroundcolor = MCOLOR(100,0,0, 150);//background color in red team        
 else if ( pCharacter->GetTeamID() == MMT_BLUE)             
backgroundcolor = MCOLOR(0,0,100, 150); //background color in blue team        
 else              backgroundcolor = MCOLOR(0,0,0, 150); //background color in normal match     
pDC->SetColor(backgroundcolor);      
pDC->FillRectangle( MGetWorkspaceWidth() / 2 - 000, /*<-the positioning-> */MGetWorkspaceHeight() * (00.0f/800.0f) - 7, 445, 32); //configures background size 
        backgroundcolor = MCOLOR( 190,125,210, 125); // font color -        
 pDC->SetColor( backgroundcolor);
[/COLOR]

add background to these weaponinfo, also you also add there the range for melee types, just add the m_nRange(); same way as you have created the delay and damage identifcations.
 
Last edited: