Live players in the event channel.

Results 1 to 6 of 6
  1. #1
    Feel the wind. Orby is offline
    True MemberRank
    Oct 2015 Join Date
    WorldLocation
    253Posts

    wink Live players in the event channel.

    Since I was there these days I decided to make this contribution, I made this code for you to add in your sources.
    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);
    Credit to me for this great idea.
    Last edited by Orby; 20-11-18 at 09:43 PM.


  2. #2
    Member ilmar18 is offline
    MemberRank
    Mar 2014 Join Date
    BrazilLocation
    83Posts

    Re: Live players in the event channel.

    very good, I'm sure it will be very useful for me and for many people in this community

  3. #3
    Member TsukynoMe is offline
    MemberRank
    Nov 2012 Join Date
    MarsLocation
    61Posts

    Re: Live players in the event channel.

    Sorry but I would have thought of this before hahaha.
    for some time now I've been planning a battle royale mode on gunz
    but it is something complicated since it does not have the function of inventory or collection of items, in addition I am looking for a way to import a
    map for the gunz of a very reasonable size for the mode.

  4. #4
    Feel the wind. Orby is offline
    True MemberRank
    Oct 2015 Join Date
    WorldLocation
    253Posts

    Re: Live players in the event channel.

    Quote Originally Posted by TsukynoMe View Post
    Sorry but I would have thought of this before hahaha.
    for some time now I've been planning a battle royale mode on gunz
    but it is something complicated since it does not have the function of inventory or collection of items, in addition I am looking for a way to import a
    map for the gunz of a very reasonable size for the mode.
    And a waste of time battle royale to gunz, even because it is out of the term gunz, it is not worth wasting time for it, better think of creating something related to gunz something that does not stay out of the standard.

  5. #5
    Member TsukynoMe is offline
    MemberRank
    Nov 2012 Join Date
    MarsLocation
    61Posts

    Re: Live players in the event channel.

    Quote Originally Posted by Orby View Post
    And a waste of time battle royale to gunz, even because it is out of the term gunz, it is not worth wasting time for it, better think of creating something related to gunz something that does not stay out of the standard.
    i thought the same way, since i started a project on unity3d specifically for the battle royale game mode, gunz died a long time due to bad faith of the community in question the renewal of it.
    leaving a little of the common or the sameness that lasted a long time.

  6. #6
    Registered operation gunz is offline
    MemberRank
    Apr 2020 Join Date
    10Posts

    Re: Live players in the event channel.

    In which add line?



Advertisement