Gunz VIP WALL

Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25
  1. #16
    Hakuna Matata bulli10 is offline
    MemberRank
    Feb 2011 Join Date
    697Posts

    Re: Gunz VIP WALL

    actully it work perfect ... in my server 1 thing that noone never release has released just click on the thx button noobs ...

  2. #17
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: Gunz VIP WALL

    Quote Originally Posted by bulli10 View Post
    actully it work perfect ... in my server 1 thing that noone never release has released just click on the thx button noobs ...
    Restart your client, timer is reset.

    >him not knowing that was totally client sided proves he doesn't know what he's doing.

  3. #18
    Proficient Member iDelta123 is offline
    MemberRank
    Apr 2012 Join Date
    The NetherlandsLocation
    154Posts

    Re: Gunz VIP WALL

    Quote Originally Posted by qet123 View Post
    Another poor coding.
    LOL, oops.
    I posted ZPostAdminAnnounce, i meant ZPostVIPAnnounce.
    It was my old code..

  4. #19
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: Gunz VIP WALL

    Quote Originally Posted by iDelta123 View Post
    LOL, oops.
    I posted ZPostAdminAnnounce, i meant ZPostVIPAnnounce.
    It was my old code..
    if it's ZPostVipAnnounce, then show us all the code to decide if it's stable!

  5. #20
    Ā  Phoenix is offline
    ModeratorRank
    Mar 2009 Join Date
    6,890Posts

    Re: Gunz VIP WALL

    Stay on topic in order to avoid all the spam. Thanks.

  6. #21
    I am THE DON Joe9099 is offline
    MemberRank
    Jan 2007 Join Date
    England, UkLocation
    3,655Posts

    Re: Gunz VIP WALL

    Best thing i would do would be to make it work via the database, so when logging in your account is checked via database on when you last did the wall etc...

  7. #22
    Valued Member Superior is offline
    MemberRank
    Mar 2012 Join Date
    Edmonton, AlberLocation
    117Posts

    Re: Gunz VIP WALL

    Great release!

  8. #23
    Account Upgraded | Title Enabled! Rejain is offline
    MemberRank
    Jul 2012 Join Date
    201Posts

    cool Re: Gunz VIP WALL

    dosent work.
    Last edited by Rejain; 06-10-12 at 06:56 PM.

  9. #24
    Valued Member gaspartx is offline
    MemberRank
    Apr 2009 Join Date
    BrazilLocation
    102Posts

    Re: Gunz VIP WALL

    MMatchObject.h - Line 1184
    Code:
    inline bool IsVipGrade(MMatchUserGradeID nGrade) 
    {
    	if (nGrade == MMUG_VIP1)
    		return true;
    
    	return false;
    }
    MMatchObject.h - Line 1192
    Code:
    inline bool IsVipGrade(MMatchObject* pObject) 
    {
    	if (pObject == NULL) return false;
    
    	return IsVipGrade(pObject->GetAccountInfo()->m_nUGrade);
    }
    MMatchServer_Admin.cpp - Function OnAdminAnnounce add this:
    Code:
    if (!IsAdminGrade(pObj) && !IsVipGrade(pObj))
    {
    DisconnectObject(uidAdmin);
    return;
    }
    For More Security (:
    Last edited by gaspartx; 04-11-12 at 05:30 AM.

  10. #25
    Retired. Don't PM. SecretsOThePast is offline
    DeveloperRank
    Jan 2009 Join Date
    643Posts

    Re: Gunz VIP WALL

    This is awful. Take a look at an improper implementation, but it's better than having no server checks at all:

    Ideally you would want to save the time to a database, grab the variable from the database and load it into memory. Use a UNIX timestamp that gets loaded from the account information upon login. Since I don't feel like typing all of that here and writing the storedproc, here's a cheap implementation that should get you started with an idea of what should be done:

    Bottom of MMatchObject::MMatchObject, MMatchObject.cpp
    m_dwLastAnnounceMessageTime = timeGetTime();
    MMatchObject.h, in any public space in the class of MMatchObject:
    DWORD m_dwLastAnnounceMessageTime;
    Modified command handler (MMATCH_VIP_REQUEST_CHAT)
    void MMatchServer::OnRequestVIP(const MUID& uidAdmin, const MUID& uidVictim, const char* szMessage)
    {
    MMatchObject* pVIP= GetObject(uidAdmin);
    if(pVIP== NULL) return;

    if (!IsVIPGrade(pVIP)) return; // Should return the UGrade of VIP Status. You can include something like || IsAdminGrade(pVip) here but I would do it inside the function for cleanliness.

    if(!(timeGetTime() < pVIP->m_dwLastAnnounceMessageTime)) return; //This should be changed to load from the account info as a unix timestamp, not a timeGetTime variable stored in runtime memory. Otherwise, you can relog and spam the server!

    MCommand* pCmd = CreateCommand(MC_ADMIN_ANNOUNCE, MUID(0,0));
    pCmd->AddParameter(new MCmdParamUID(uidAdmin));
    pCmd->AddParameter(new MCmdParamStr(szMessage));
    pCmd->AddParameter(new MCmdParamUInt(0));
    RouteToAllClient(pCmd);

    pVIP->m_dwLastAnnounceMessageTime = timeGetTime() + 3600000; //Probably should load this from some server INI (or better yet, add varying grades that have different times per grade!)


    }



Page 2 of 2 FirstFirst 12

Advertisement