To best honest it's realy simple way, well it will work ?Code:if(strstr(ZGetGameClient()->GetStageName(),"[P=40]")) { #define MIN_PING 40 int nPing = (pCharacter->GetUID() == ZGetGameClient()->GetPlayerUID() ? 0 : MIN_PING); MMatchPeerInfo* pPeer = ZGetGameClient()->FindPeer(pCharacter->GetUID()); if (pPeer) { if ( ZGetGame()->IsReplay()) nPing = 0; else nPing = pPeer->GetPing(ZGetGame()->GetTickTime()); } pItem->nPing = nPing; pItem->bMyChar = pCharacter->IsHero(); } else { int nPing = (pCharacter->GetUID() == ZGetGameClient()->GetPlayerUID() ? 0 : MAX_PING); MMatchPeerInfo* pPeer = ZGetGameClient()->FindPeer(pCharacter->GetUID()); if (pPeer) { if ( ZGetGame()->IsReplay()) nPing = 0; else nPing = pPeer->GetPing(ZGetGame()->GetTickTime()); } pItem->nPing = nPing; pItem->bMyChar = pCharacter->IsHero(); }
18/4
Code:if (pPeer) { if ( ZGetGame()->IsReplay()) nPing = 0; #define TEST 80 else if(nPing > TEST) ZApplication::GetGameInterface()->ReserveLeaveBattle(); else nPing = pPeer->GetPing(ZGetGame()->GetTickTime()); }



Reply With Quote![[Code]Simple way of PingLimiter](http://ragezone.com/hyper728.png)


