Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void wallhack()
- {
- while (true) // создаем бесконечный цикл
- {
- Sleep(10); // таймаут 10 мс, чтобы не грузить процессор под 100
- if (!wallhack && !readMem<DWORD>(readMem<DWORD>(clientBase + dwLocalPlayer) + 0xED)) // если вх выключено или не удается прочитать память - выходим из цикла
- continue;
- DWORD glowObj = readMem<DWORD>(clientBase + dwGlowObjectManager); // создаем объект glowObj из модельки игрока
- DWORD myTeam = readMem<DWORD>(readMem<DWORD>(clientBase + dwLocalPlayer) + m_iTeamNum); // создаем объект тиммейтов
- for (int x = 0; x < 32; x++) // сам вх
- {
- DWORD player = readMem<DWORD>(clientBase + dwEntityList + x * 0x10); // обычный игрок
- if (player == 0)
- continue;
- bool dormant = readMem<bool>(player + 0xED); // спектатор
- if (dormant)
- continue;
- DWORD team = readMem<DWORD>(player + m_iTeamNum); // тиммейт
- if (team != 2 && team != 3)
- continue;
- DWORD currentGlowIndex = readMem<DWORD>(player + m_iGlowIndex); // текущий индекс игрока
- if (team != myTeam) // если игрок не тиммейт
- {
- // делаем его обводку красным
- writeMem<float>(glowObj + currentGlowIndex * 0x38 + 0x4, 255); // red
- writeMem<float>(glowObj + currentGlowIndex * 0x38 + 0x8, 0); // green
- writeMem<float>(glowObj + currentGlowIndex * 0x38 + 0xC, 0); // blue
- writeMem<float>(glowObj + currentGlowIndex * 0x38 + 0x10, 255);
- writeMem<bool>(glowObj + currentGlowIndex * 0x38 + 0x24, true);
- writeMem<bool>(glowObj + currentGlowIndex * 0x38 + 0x25, false);
- }
- else // если игрок тиммейт
- {
- // делаем его обводку синим
- writeMem<float>(glowObj + currentGlowIndex * 0x38 + 0x4, 0); // red
- writeMem<float>(glowObj + currentGlowIndex * 0x38 + 0x8, 0); // green
- writeMem<float>(glowObj + currentGlowIndex * 0x38 + 0xC, 255); // blue
- writeMem<float>(glowObj + currentGlowIndex * 0x38 + 0x10, 255);
- writeMem<bool>(glowObj + currentGlowIndex * 0x38 + 0x24, true);
- writeMem<bool>(glowObj + currentGlowIndex * 0x38 + 0x25, false);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment