XYZSTORE
-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Source from UC and modificated by emsliexyz
Код:
o localplayer = cheat::engine::get_localplayer();
if (localplayer)
{
auto controller = localplayer->PlayerController;
if (controller)
{
auto hud = controller->MyHUD;
if (hud)
{
DWORD old;
auto vtable = hud->GetVTable();
VirtualProtect(vtable, 0x1000, 0x40, &old);
if (vtable[57] != hook::process_event_ahud::hook)
{
hook::process_event_ahud::original = reinterpret_cast<process_event_t>(vtable[57]);
vtable[57] = hook::process_event_ahud::hook;
}
VirtualProtect(vtable, 0x1000, old, &old);
}
}
}
Код:
void hook::process_event_ahud::hook(Classes::UObject* object, Classes::UFunction* function, void* params)
{
// ReceiveDrawHUD
if (function && function->Name.ComparisonIndex == 4924)
{
auto hud = static_cast<Classes::AHUD*>(object);
// DRAW
}
}