Гайд ChatPrintF

Модератор форума
Модератор
Статус
Оффлайн
Регистрация
2 Дек 2016
Сообщения
2,368
Реакции[?]
1,879
Поинты[?]
34K
g_ChatElement :
C++:
g_ChatElement = FindHudElement<CHudChat>("CHudChat");
Class CHudChat:​

C++:
class CHudChat
{
public:
    void ChatPrintf(int iPlayerIndex, int iFilter, const char* fmt, ...)
    {

        call_vfunc<void(__cdecl*)(void*, int, int, const char*, ...)>(this, 27)(this, iPlayerIndex, iFilter, fmt);

    }
};
FindHudElement :​

C++:
static T* FindHudElement(const char* name)
{

    static auto pThis = *reinterpret_cast<DWORD**>(U::pattern_scan(GetModuleHandleA(U::ClientModule()), "B9 ? ? ? ? 68 ? ? ? ? E8 ? ? ? ? 89 46 24") + 1);

    static auto find_hud_element = reinterpret_cast<DWORD(__thiscall*)(void*, const char*)>(U::pattern_scan(GetModuleHandleA(U::ClientModule()), "55 8B EC 53 8B 5D 08 56 57 8B F9 33 F6 39")); 

    return (T*)find_hud_element(pThis, name);

}
Example:
C++:
g_ChatElement->ChatPrintf(0, 0, " ""\x04""%s bought %s\n", pinfo.name, gun.c_str());
 
Сверху Снизу