-
Автор темы
- #1
Залупа не хочет работать, не могу понять, где я проебался... (Сеты новые)
C++:
#include <iostream>
#include <Windows.h>
#include <TlHelp32.h>
const DWORD dwLocalPlayer = 0xD8A2DC;
const DWORD dwEntityList = 0x4DA31EC;
const DWORD m_iTeamNum = 0xF4;
const DWORD m_iGlowIndex = 0xA438;
const DWORD dwGlowObjectManager = 0x52EB678;
HANDLE process;
DWORD clientBase;
DWORD getModuleBaseAddress(DWORD pid, const char* name)
{
HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pid);
MODULEENTRY32 mEntry;
mEntry.dwSize = sizeof(MODULEENTRY32);
do
{
if (!strcmp(mEntry.szModule, name))
{
CloseHandle(snapshot);
return (DWORD)mEntry.modBaseAddr;
}
} while (Module32Next(snapshot, &mEntry));
}
template <typename T>
T readMem(DWORD address)
{
T buffer;
ReadProcessMemory(process, (LPVOID)address, &buffer, sizeof(buffer), 0);
return buffer;
}
template <typename T>
void writeMem(DWORD address, T value) {WriteProcessMemory(process, (LPVOID)address, &value, sizeof(value), 0);}
void GlowESP()
{
while (true)
{
int player = readMem<DWORD>(clientBase + dwLocalPlayer);
int glow_manager = readMem<DWORD>(clientBase + dwGlowObjectManager);
int team = readMem<DWORD>(player + m_iTeamNum);
for (int i = 0; i < 32; i++)
{
int entity = readMem<DWORD>(clientBase + dwGlowObjectManager + i * 0x10);
if (entity)
{
int entity_team_id = readMem<DWORD>(entity + m_iTeamNum);
int entity_glow = readMem<DWORD>(entity + m_iGlowIndex);
if (entity_team_id != team)
{
writeMem<float>(glow_manager + entity_glow * 0x38 + 0x8, 1.f);
writeMem<float>(glow_manager + entity_glow * 0x38 + 0xC, 0.f);
writeMem<float>(glow_manager + entity_glow * 0x38 + 0x10, 0.f);
writeMem<float>(glow_manager + entity_glow * 0x38 + 0x14, 1.f);
writeMem<bool>(glow_manager + entity_glow * 0x38 + 0x28, true);
writeMem<bool>(glow_manager + entity_glow * 0x38 + 0x29, false);
}
}
}
}
}
int main() {
HWND hwnd;
DWORD pid;
SetConsoleCP(1251);
SetConsoleOutputCP(1251);
hwnd = FindWindowA(0, "Counter-Strike: Global Offensive");
GetWindowThreadProcessId(hwnd, &pid);
process = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
clientBase = getModuleBaseAddress(pid, "client.dll");
GlowESP();
}