Модератор форума
-
Автор темы
- #1
g_ChatElement :
Class CHudChat:
C++:
g_ChatElement = FindHudElement<CHudChat>("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);
}
};
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);
}
C++:
g_ChatElement->ChatPrintf(0, 0, " ""\x04""%s bought %s\n", pinfo.name, gun.c_str());