Code:
#pragma once
#include <iostream>
#include <Windows.h>
#include <string>
#include <TlHelp32.h>
#include <stdint.h>
#include "HackProcess.h"
using namespace std;
HackProcess m;
struct myPlayer_t
{
DWORD cLocalPlayer;
int flag;
int GlowObject;
int PlayerTeam;
int PlayerChID;
bool PlayerDormant;
void ReadInformation()
{
ReadProcessMemory(m.HandleProcess, (const void*)(m.Client + PlayerBase), &cLocalPlayer, sizeof(DWORD), NULL);
ReadProcessMemory(m.HandleProcess, (const void*)(cLocalPlayer + FlagOFF), &flag, sizeof(int), NULL);
ReadProcessMemory(m.HandleProcess, (const void*)(cLocalPlayer + GlowObjectOFF), &GlowObject, sizeof(int), NULL);
ReadProcessMemory(m.HandleProcess, (const void*)(cLocalPlayer + TeamOFF), &PlayerTeam, sizeof(int), NULL);
ReadProcessMemory(m.HandleProcess, (const void*)(cLocalPlayer + ChIDOFF), &PlayerChID, sizeof(int), NULL);
ReadProcessMemory(m.HandleProcess, (const void*)(cLocalPlayer + ChIDOFF), &PlayerChID, sizeof(int), NULL);
ReadProcessMemory(m.HandleProcess, (const void*)(cLocalPlayer + bDormantOFF), &PlayerDormant, sizeof(bool), NULL);
}
}myPlayer;
struct Entity_t {
DWORD cEntitylist;
int EntityDormant;
int EntityTeam;
int EntityGlowIndex;
int EntityHealth;
void ReadInformation(int Player)
{
ReadProcessMemory(m.HandleProcess, (const void*)(m.Client + EntityBase + (Player * 0x10)), &cEntitylist, sizeof(DWORD), NULL);
ReadProcessMemory(m.HandleProcess, (const void*)(cEntitylist + bDormantOFF), &EntityDormant, sizeof(int), NULL);
ReadProcessMemory(m.HandleProcess, (const void*)(cEntitylist + bDormantOFF), &EntityTeam, sizeof(int), NULL);
ReadProcessMemory(m.HandleProcess, (const void*)(cEntitylist + GlowIndexOFF), &EntityGlowIndex, sizeof(int), NULL);
}
}Entity[64];
void GlowESP()
{
if (Entity[64].EntityTeam == myPlayer.PlayerTeam)
{
WriteProcessMemory(m.HandleProcess, (void*)(myPlayer.GlowObject + ((Entity[64].EntityGlowIndex * 0x38) + 0x4)), &GlowCTRed, sizeof(float), NULL);
WriteProcessMemory(m.HandleProcess, (void*)(myPlayer.GlowObject + ((Entity[64].EntityGlowIndex * 0x38) + 0x8)), &GlowCTGreen, sizeof(float), NULL);
WriteProcessMemory(m.HandleProcess, (void*)(myPlayer.GlowObject + ((Entity[64].EntityGlowIndex * 0x38) + 0xC)), &GlowCTBlue, sizeof(float), NULL);
WriteProcessMemory(m.HandleProcess, (void*)(myPlayer.GlowObject + ((Entity[64].EntityGlowIndex * 0x38) + 0x10)), &GlowCTAlpha, sizeof(float), NULL);
WriteProcessMemory(m.HandleProcess, (void*)(myPlayer.GlowObject + ((Entity[64].EntityGlowIndex * 0x38) + 0x24)), &rwoCT, sizeof(bool), NULL);
WriteProcessMemory(m.HandleProcess, (void*)(myPlayer.GlowObject + ((Entity[64].EntityGlowIndex * 0x38) + 0x25)), &rwouCT, sizeof(bool), NULL);
}
else
{
WriteProcessMemory(m.HandleProcess, (void*)(myPlayer.GlowObject + ((Entity[64].EntityGlowIndex * 0x38) + 0x4)), &GlowTRed, sizeof(float), NULL);
WriteProcessMemory(m.HandleProcess, (void*)(myPlayer.GlowObject + ((Entity[64].EntityGlowIndex * 0x38) + 0x8)), &GlowTGreen, sizeof(float), NULL);
WriteProcessMemory(m.HandleProcess, (void*)(myPlayer.GlowObject + ((Entity[64].EntityGlowIndex * 0x38) + 0xC)), &GlowTBlue, sizeof(float), NULL);
WriteProcessMemory(m.HandleProcess, (void*)(myPlayer.GlowObject + ((Entity[64].EntityGlowIndex * 0x38) + 0x10)), &GlowTAlpha, sizeof(float), NULL);
WriteProcessMemory(m.HandleProcess, (void*)(myPlayer.GlowObject + ((Entity[64].EntityGlowIndex * 0x38) + 0x24)), &rwoT, sizeof(bool), NULL);
WriteProcessMemory(m.HandleProcess, (void*)(myPlayer.GlowObject + ((Entity[64].EntityGlowIndex * 0x38) + 0x25)), &rwouT, sizeof(bool), NULL);
}
}
int main()
{
cout << "Watting for CsGo...";
m.RunProcess();
while (!GetAsyncKeyState(VK_F5))
{
myPlayer.ReadInformation();
for (int i = 0; i < NumOfPlayer; i++)
{
Entity[i].ReadInformation(i);
}
GlowESP();
}
return 0;
}