Ask question

Ask Questions and Get Answers from Our Community

Answer

Answer Questions and Become an Expert on Your Topic

Contact Staff

Our Experts are Ready to Answer your Questions

C++ Drop Hack Time Check

nyami

Yeni Üye
Katılım
20 May 2022
Mesajlar
10
Tepki
8
Puan
3
Credits
126
Points
50
Muhtemelen lag engellemek için olan bir şey.

common/service.h:
C++:
//Ekle
#define ENABLE_DROP_HACK_FIX            // Drop hack time check

Char.cpp:
C++:
//Arat
    m_dwLastGoldDropTime = 0;

//Altına Ekle
#ifdef ENABLE_DROP_HACK_FIX
    CountDrops = 0;
    LastDropTime = 0;
#endif

Char.h:
C++:
//Arat
};

ESex GET_SEX(LPCHARACTER ch);

#endif

//Üstüne Ekle
#ifdef ENABLE_DROP_HACK_FIX
protected:
    int                    LastDropTime;
    int                    CountDrops;
#endif

char_item.cpp:
C++:
//Arat
    GPOS pxPos = GetXYZ();

    if (pkItemToDrop->AddToGround(GetMapIndex(), pxPos))

//Üstüne Ekle
#ifdef ENABLE_DROP_HACK_FIX
    if (thecore_pulse() > LastDropTime + 25)
        CountDrops = 0;

    if (thecore_pulse() < LastDropTime + 25 && CountDrops >= 4)
    {
        CountDrops = 0;
        sys_err("%s[%d] has been disconnected because of drophack using", GetName(), GetPlayerID());
        GetDesc()->SetCloseReason("DROP_HACK");
        GetDesc()->SetPhase(PHASE_CLOSE);
        return false;
    }
#endif
 

Şu anda bu konu'yu okuyan kullanıcılar

Benzer konular Forum Tarih
T R I O D I S Grafik/Models/Maps 0 36

Benzer konular

Üst