Начинающий
- Статус
- Оффлайн
- Регистрация
- 27 Мар 2018
- Сообщения
- 17
- Реакции
- 1
So i have a "working" code for force update , but it only updates hud icons, like i changed the knife from karambit to m9.
Doesn't actually update paint kits, can someone help me out?
Here's the code I have:
void force_full_update()
{
static auto fn = reinterpret_cast<std::int32_t(__thiscall*)(void*, std::int32_t)>(utils::pattern_scan(GetModuleHandleA("client_panorama.dll" ), ("55 8B EC 51 53 56 8B 75 08 8B D9 57 6B FE 2C 89 5D FC")));
static auto full_update = reinterpret_cast<void(*)(void)>(utils::pattern_scan(FORCE_FULL_UPDATE));
auto element = interfaces::Hud->FindHudElement<std::uintptr_t*>(("CCSGO_HudWeaponSelection"));
auto hud_weapons = reinterpret_cast<hud_weapons_t*>(std::uintptr_t(element) - 0x9C);
if (hud_weapons == nullptr)
return;
if (!*hud_weapons->get_weapon_count())
return;
for (std::int32_t i = 0; i < *hud_weapons->get_weapon_count(); i++)
i = fn(hud_weapons, i);
interfaces::client_state->full_update();
return;
}
Doesn't actually update paint kits, can someone help me out?
Here's the code I have:
void force_full_update()
{
static auto fn = reinterpret_cast<std::int32_t(__thiscall*)(void*, std::int32_t)>(utils::pattern_scan(GetModuleHandleA("client_panorama.dll" ), ("55 8B EC 51 53 56 8B 75 08 8B D9 57 6B FE 2C 89 5D FC")));
static auto full_update = reinterpret_cast<void(*)(void)>(utils::pattern_scan(FORCE_FULL_UPDATE));
auto element = interfaces::Hud->FindHudElement<std::uintptr_t*>(("CCSGO_HudWeaponSelection"));
auto hud_weapons = reinterpret_cast<hud_weapons_t*>(std::uintptr_t(element) - 0x9C);
if (hud_weapons == nullptr)
return;
if (!*hud_weapons->get_weapon_count())
return;
for (std::int32_t i = 0; i < *hud_weapons->get_weapon_count(); i++)
i = fn(hud_weapons, i);
interfaces::client_state->full_update();
return;
}
