How can I show like
"HP : 115/115"
"AP : 58/58'
In the HP/AP bars ?
Thanks.
How can I show like
"HP : 115/115"
"AP : 58/58'
In the HP/AP bars ?
Thanks.
Last edited by maxolahird; 12-08-16 at 12:09 AM.
Go to ZCombatInterface.cpp
in void ZCombatInterface::OnDraw(MDrawContext* pDC)
use TextRelative function or pDC->Text to print on the screen and use zcharacter to get your hp and ap
in if (!m_bSkipUIDrawByRule)
Code:ZCharacter* pCharacter = ZGetGame()->m_pMyCharacter; if (pCharacter && !pCharacter->IsDie()) { MFont* pFont = MFontManager::Get("FONTa6_O2Wht"); pDC->SetFont(pFont); pDC->SetColor(MCOLOR(0xFFFFFFFF)); char szMsg[128] = { 0, }; sprintf(szMsg, "HP : %i / %i", (int)pCharacter->GetHP(), (int)pCharacter->GetMaxHP()); TextRelative(pDC, 100.f / 800.f, 23.f / 600.f, szMsg); sprintf(szMsg, "AP : %i / %i", (int)pCharacter->GetAP(), (int)pCharacter->GetMaxAP()); TextRelative(pDC, 100.f / 800.f, 50.f / 600.f, szMsg); }
Hi, how can I remove that HP/AP text from replays? Thanks
I use an 'if' statement? Oh well, I'm really bad at coding I cant figure out the right way to add that to the code
PHP Code:sprintf(szMsg, "HP : %i", (int)pCharacter->GetHP());
TextRelative(pDC, 100.f / 800.f, 23.f / 600.f, szMsg);
sprintf(szMsg, "AP : %i", (int)pCharacter->GetAP());
TextRelative(pDC, 100.f / 800.f, 50.f / 600.f, szMsg);
Yep, if statement
It worked! But at the end of the replay it shows the HP / AP text.. I have no idea what could be causing that because as you can see it was supposed to show it only when not in replay.
if (!ZGetGame()->IsReplay())
{
sprintf(szMsg, "HP : %i", (int)pCharacter->GetHP());
//sprintf(szMsg, "HP : %i / %i", (int)pCharacter->GetHP(), (int)pCharacter->GetMaxHP());
TextRelative(pDC, 100.f / 800.f, 23.f / 600.f, szMsg);
sprintf(szMsg, "AP : %i", (int)pCharacter->GetAP());
//sprintf(szMsg, "AP : %i / %i", (int)pCharacter->GetAP(), (int)pCharacter->GetMaxAP());
TextRelative(pDC, 100.f / 800.f, 50.f / 600.f, szMsg);
}
what do you mean by at the end of the replay? o.o
When you go to the lobby when replay is over... like 2 seconds before it ends, it shows the HP / AP text. Not really important but I really like things perfect. If its not "fixable" its ok...
I tried putting the if statement in many places around the code but same result.
Last edited by itsmemario; 24-08-16 at 04:16 AM.
That's incredibly strange and doesn't at all happen for me so I'm not sure what to say
iFin i add the source code it's showing that it compiled normally without any errors but for some reason it's not showing up at the game no matter what kinde of code i add to the soruce ( i used to try many diffraent code's for the hp bar but none of them seems to show at the game but were good compiled at the soruce , hope to hear from u or at list from someone :P