deathsecrets (05-09-2019),ItsBl4z3 (01-10-2019),manuelsantos92 (01-22-2019),sujeito (04-04-2019),themis2523 (05-21-2019)
C++ Basic Radar Hack FunctionRecently I have seen a lot of people asking how to create a basic radar hack. Let me know if you have any questions.
Code:struct Offsets { DWORD dwLocalPlayer = 0xCBD6B4; DWORD dwEntityList = 0x4CCDBFC; DWORD m_iTeamNum = 0xF4; DWORD m_bSpotted = 0x93D; DWORD m_bDormant = 0xED; } offsets; void ToggleRadar() { if (Radar) { DWORD LocalPlayer = ReadMemory<DWORD>(mod.Client + offsets.dwLocalPlayer); int playerTeam = ReadMemory<int>(LocalPlayer + offsets.m_iTeamNum); for (int i = 0; i < 32; i++) { DWORD Entity = ReadMemory<DWORD>(mod.Client + offsets.dwEntityList + (i * 0x10)); int entityTeam = ReadMemory<int>(Entity + offsets.m_iTeamNum); bool isEntityDormant = ReadMemory<bool>(Entity + offsets.m_bDormant); bool isEntitySpotted = ReadMemory<bool>(Entity + offsets.m_bSpotted); if (!isEntityDormant && entityTeam != playerTeam) { if (!isEntitySpotted) WriteMemory<int>(Entity + offsets.m_bSpotted, 1); } else { continue; } } Sleep(1); } }
Last edited by Sandwich; 01-09-2019 at 11:48 PM.
deathsecrets (05-09-2019),ItsBl4z3 (01-10-2019),manuelsantos92 (01-22-2019),sujeito (04-04-2019),themis2523 (05-21-2019)
A bit improved:
Code:struct Offsets { DWORD dwLocalPlayer = 0xCBD6B4; DWORD dwEntityList = 0x4CCDBFC; DWORD m_iTeamNum = 0xF4; DWORD m_bSpotted = 0x93D; DWORD m_bDormant = 0xED; DWORD m_iHealth = 0x100; } offsets; void Radar() { for (;;) { DWORD localPlayer = ReadMemory<DWORD>(mod.Client + offsets.dwLocalPlayer); int localPlayerTeam = ReadMemory<int>(localPlayer + offsets.m_iTeamNum); for (int i = 1; i <= 32; i++) { DWORD player = ReadMemory<DWORD>(mod.Client + offsets.dwEntityList + (i - 1) * 0x10); int playerTeam = ReadMemory<int>(player + offsets.m_iTeamNum); if (playerTeam == localPlayerTeam || playerTeam == 1) continue; bool isPlayerDormant = ReadMemory<bool>(player + offsets.m_bDormant); if (isPlayerDormant) continue; int playerHealth = ReadMemory<int>(player + offsets.m_iHealth); if (playerHealth <= 0) continue; bool isPlayerSpotted = ReadMemory<bool>(player + offsets.m_bSpotted); if (isPlayerSpotted) continue; WriteMemory<bool>(player + offsets.m_bSpotted, 1); } Sleep(200); } }
deathsecrets (05-09-2019),manuelsantos92 (01-22-2019),themis2523 (05-21-2019)
deathsecrets (05-09-2019)
how do i fix the errors get like 30 in vs 2017
Actually, i've got a question about
What's the point of using a DWORD for LocalPlayer but then using an integer for playerTeam, which uses LocalPlayer as input?Code:DWORD LocalPlayer = ReadMemory<DWORD>(mod.Client + offsets.dwLocalPlayer); int playerTeam = ReadMemory<int>(LocalPlayer + offsets.m_iTeamNum);
Why not using one or the other for both variables?
2nd question is about
Like seriously, how can someone know that you have to use (i * 0x10)? Where does the 0x10 come from?Code:DWORD Entity = ReadMemory<DWORD>(mod.Client + offsets.dwEntityList + (i * 0x10));
This might seem like "explain the whole code to me", but it's not LOL
I get the point of the generic function, it's just this practical stuff that gets me stopped sometimes.
KF1337 (05-14-2019)
If you lookup the data/structures in Cheat Engine you also can see that there is always a gap between players which is 10. You also should find more informations around that.
To reproduce this just search for your health. Decrease it. Search again for that value. Till you get a few less results. Then you need some knowledge how this tables are structured like. Memory View > Dissect Data/Structures > Follow the steps there.
#LOGS
12-02-2020 ⌨ [MPGH]defaulto got gifted the Premium Membership from [MPGH]Azuki - sponsored by [MPGH]Flengo.
27-11-2019 ⌨ [MPGH]defaulto captured the GFX Team Base together with [MPGH]Howl & [MPGH]Poonce.
08-14-2017 ⌨ defaulto joined the game.
KF1337 (05-21-2019)
pls i need some video tutorial how to make csgo cheats im new