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!

Extra Info [1.5]

Experienced Elementalist
Joined
Oct 14, 2015
Messages
290
Reaction score
83
Good morning, I saw here in the area many people have difficulty with HP and AP bars on your source, then I decided to post how to create im ExtraInfo in your Source.

Let's ZCombatInterface.cpp:

Look for void ZCombatInterface :: OnDraw (MDrawContext * pDC)

Beneath DrawMyWeaponPont(pDC); added DrawHPAPInfo(pDC);

Just below add:

Code:
void ZCombatInterface::DrawHPAPInfo(MDrawContext* pDC)
{
    ZCharacter* pCharacter = GetTargetCharacter();

    if (pCharacter == NULL || pCharacter->IsObserverTarget())
        return;

    float fRx = (float)MGetWorkspaceWidth();
    float fRy = (float)MGetWorkspaceHeight();

    float fX = (155.0f / 1024.0f) * fRx;
    float fY = (30.0f / 768.0f) * fRy;
    float fY_AP = (34.0f / 768.0f) * fRy;

    char szMsg[128] = { 0, };
    pDC->SetFont(GetGameFont());
    MFont *pFont = MFontManager::Get("FONTa6_O2Wht");

    if (pFont == NULL)
        pDC->SetFont(GetFont());
    else
        pDC->SetFont(pFont);

    pDC->SetColor(MCOLOR(0xFFFFFFFF));
    pDC->SetOpacity(255);
    {
    if (ZGetGame())
    {
    pDC->SetFont(MFontManager::Get("FONTHP"));
    char szMsg[70];
    int hp = (int)pCharacter->GetHP();
    if (hp <= 1 && !pCharacter->IsDie()) hp = 1;
    sprintf(szMsg, " %d", hp,(int)pCharacter->GetMaxHP());
    pDC->SetColor(MCOLOR(0xFF1E90FF));
    TextRelative(pDC, 30.f / 800.f, 18.f / 600.f, szMsg);
    pDC->SetFont(MFontManager::Get("FONTAP"));
    sprintf(szMsg, " %d",(int)pCharacter->GetAP());
    pDC->SetColor(MCOLOR(0xFFFF0000));
    TextRelative(pDC, 40.f / 800.f, 48.f / 600.f, szMsg);
    }
    pDC->SetFont(GetGameFont());
    }

}

Now let's ZCombatInterface.h: We look for: void DrawMyNamePont(MDrawContext* pDC);

Underneath added: void DrawHPAPInfo(MDrawContext* pDC);

Ready now to be happy :D
 
Experienced Elementalist
Joined
Oct 14, 2015
Messages
290
Reaction score
83
Shows the amount HP and AP in your HP bar on the corner side gives screen.
 
Newbie Spellweaver
Joined
Oct 8, 2018
Messages
12
Reaction score
0
how can I change the position place
how can I change the position place
 
Experienced Elementalist
Joined
Oct 14, 2015
Messages
290
Reaction score
83
TextRelative(pDC, 40.f / 800.f, 48.f / 600.f, szMsg);
 
Newbie Spellweaver
Joined
Apr 1, 2017
Messages
47
Reaction score
1
Compiling...ZCombatInterface.cppZCombatInterface.cpp(774) : error C3861: 'DrawHPAPInfo': identifier not found, even with argument-dependent lookupZCombatInterface.cpp(803) : error C2039: 'DrawHPAPInfo' : is not a member of 'ZCombatInterface' d:\gunz\gunz 1.5 repack by jur13n #3 (edited)\source\gunz\ZCombatInterface.h(86) : see declaration of 'ZCombatInterface'ZCombatInterface.cpp(804) : error C2365: 'DrawHPAPInfo' : redefinition; previous definition was a 'formerly unknown identifier'ZCombatInterface.cpp(805) : error C3861: 'GetTargetCharacter': identifier not found, even with argument-dependent lookupZCombatInterface.cpp(818) : error C3861: 'GetGameFont': identifier not found, even with argument-dependent lookupZCombatInterface.cpp(822) : error C3861: 'GetFont': identifier not found, even with argument-dependent lookupZCombatInterface.cpp(843) : error C3861: 'GetGameFont': identifier not found, even with argument-dependent lookupBuild log was saved at "file://c:\Users\Warth\Desktop\Iteam\Built Files\Source\Gunz\KOR_Release_publish\BuildLog.htm"Gunz - 7 error(s), 0 warning(s)
 
Back
Top