Onforum.net - Web and gaming resource community

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members .

Live players in the event channel.

Blaze

Elite
Elite
VIP
Credits
607
This code shows when live players are inside the room.
Making it even easier for you who likes to give event.

Go to ZCombatInterface.cpp

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

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

    char szAlive[64]; // alive
    pDC->SetFont(GetGameFont()); // default font
    pDC->SetColor(MCOLOR(255, 255, 255)); // color

    if (strstr(ZGetGameClient()->GetChannelName(), "Channel (Event)") && ZGetMyInfo()->IsAdminGrade()) // channel
    {
        int nPlayers = 0;
        for (ZCharacterManager::iterator itor = ZGetGame()->m_CharacterManager.begin(); itor != ZGetGame()->m_CharacterManager.end(); ++itor)
        {
            ZCharacter* pCharacter = (*itor).second;
            if (ZGetGame()->GetMatch()->IsTeamPlay())
            {
                if (!pCharacter->IsDie() && pCharacter->GetTeamID() != ZGetGame()->m_pMyCharacter->GetTeamID())
                {
                    ++nPlayers;
                }
            }
            else if (!pCharacter->IsDie() && pCharacter != ZGetGame()->m_pMyCharacter)
            {
                ++nPlayers;
            }
        }
        sprintf(szAlive, "%d Live players in the room", nPlayers);
        TextRelative(pDC, 10.f / 800.f, 100.f / 600.f, szAlive);
    }
}
Go to ZCombatInterface.h
Code:
void         Alive(MDrawContext* pDC);
TqjCeqf.jpg
 
Top

Dear User!

We found that you are blocking the display of ads on our site.

Please add it to the exception list or disable AdBlock.

The advertises that you'll see aren't intrusive they just help us to keep the community alive

If you don't want to see those ads just buy an upgrade.

Thank you for understanding!

Rogue

Rogue Purchase

User upgrade! at

🔥 Upgrade Now
Baba2

Baba2 Purchase

User upgrade! at

🔥 Upgrade Now

Escanor25 Purchase

User upgrade! at

🔥 Upgrade Now