auto pThis = *reinterpret_cast<DWORD**>(Utils::FindSignature("client.dll", "B9 ? ? ? ? E8 ? ? ? ? 8B 5D 08") + 1);
auto find_hud_element = reinterpret_cast<DWORD(__thiscall*)(void*, const char*)>(Utils::FindSignature("client.dll", "55 8B EC 53 8B 5D 08 56 57 8B F9 33 F6 39 77 28"));
void(__thiscall* _clear_notices)(DWORD) = (void(__thiscall*)(DWORD))Utils::FindSignature("client.dll", "55 8B EC 83 EC 0C 53 56 8B 71 58");
template<class T>
static T* FindHudElement(const char* name)
{
return (T*)find_hud_element(pThis, name);
}
DWORD* deathNotice = FindHudElement<DWORD>("CCSGO_HudDeathNotice");
////////////
if (strstr(name, "player_death")) {
if (deathNotice)
*(float*)((DWORD)deathNotice + 0x50) = c_config::get().cfg.killfeed ? 500 : 1.5;
}
if (strstr(name, "round_prestart"))
{
deathNotice = FindHudElement<DWORD>("CCSGO_HudDeathNotice");
_clear_notices(((DWORD)deathNotice - 20));
}