Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Steam Games Hacks & Cheats › Counter-Strike 2 Hacks › Counter-Strike 2 Coding & Resources › [C++] Glow function not working, not spotting the error

Question[C++] Glow function not working, not spotting the error

Posts 1–15 of 18 · Page 1 of 2
KF1337
KF1337
[C++] Glow function not working, not spotting the error
Hey it's me again!

Just wanted to ask if someone could help me with getting a Glow ESP to work.
I almost finished it. However, after successfully compiling, it just doesn't glow.

I suspect the error in this piece of code:
Code:
void Glow()
{
	while (true)
	{
		Sleep(1);
		Me.dwBaseEntity = csgo.Read<DWORD>(ClientPanorama.dwBaseModule + offset.dwLocalPlayer);
		Me.Team = csgo.Read<int>(Me.dwBaseEntity + offset.m_iTeamNum);

		for (int i = 0; i < 64; i++)
		{
			Sleep(1);
			Players[i].dwBaseEntity = csgo.Read<DWORD>(ClientPanorama.dwBaseModule + offset.dwEntityList + i * 0x10);
			Players[i].Team = csgo.Read<int>(Players[i].dwBaseEntity + offset.m_iTeamNum);
			int GlowIndex = csgo.Read<int>(Players[i].dwBaseEntity + offset.m_iGlowIndex);
			DWORD GlowObject = csgo.Read<DWORD>(ClientPanorama.dwBaseModule + offset.dwGlowObjectManager);

			if (Me.Team == Players[i].Team)
			{
				cout << "Same Team!" << endl;
				csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0x4, MyGlow.R);
				csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0x8, MyGlow.G);
				csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0xC, MyGlow.B);
				csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0x10, MyGlow.Alpha);
				csgo.Write<bool>(GlowObject + (GlowIndex * 0x38) + 0x24, MyGlow.RenderWhenOccluded);
				csgo.Write<bool>(GlowObject + (GlowIndex * 0x38) + 0x25, MyGlow.RenderWhenUnoccluded);
			}
			else
			{
				cout << "NOOOOOT Same Team!" << endl;
				csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0x4, EnemyGlow.R);
				csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0x8, EnemyGlow.G);
				csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0xC, EnemyGlow.B);
				csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0x10, EnemyGlow.Alpha);
				csgo.Write<bool>(GlowObject + (GlowIndex * 0x38) + 0x24, EnemyGlow.RenderWhenOccluded);
				csgo.Write<bool>(GlowObject + (GlowIndex * 0x38) + 0x25, EnemyGlow.RenderWhenUnoccluded);
			}
		}
	}
}
with the corresponding struct
Code:
struct structGlow
{
	float R;
	float G;
	float B;
	float Alpha;
	bool RenderWhenOccluded;
	bool RenderWhenUnoccluded;
};

struct structModule
{
	DWORD dwBaseModule;
	DWORD dwSizeModule;
} ClientPanorama;

struct structEntity
{
	DWORD dwBaseEntity;
	DWORD GlowIndex;
	int Team;
	bool isDormant;
} Me, Players[64];
Is there anything you see that might be wrong here? (offsets were freshly dumped)

Note: the "cout" statements are just for debugging purposes. Actually, they get printed, so the whole program must have come up to this point in code.
#1 · 7y ago
Sandwich
Sandwich
Quote Originally Posted by KF1337 View Post
DWORD GlowObject = csgo.Read<DWORD>(ClientPanorama.dwBaseModule + offset.dwGlowObjectManager);
Code:
var.GlowPointer = ReadMem<DWORD>(ClientPanorama.dwBase + offsets.dwGlowObjectManager);
DWORD GlowObject = ReadMem<DWORD>(var.GlowPointer + i * var.GlowObjLoopDist); //Look in your PM's for a more detailed explanation.
Quote Originally Posted by KF1337 View Post
if (Me.Team == Players[i].Team)
{
cout << "Same Team!" << endl;
csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0x4, MyGlow.R);
csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0x8, MyGlow.G);
csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0xC, MyGlow.B);
csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0x10, MyGlow.Alpha);
csgo.Write<bool>(GlowObject + (GlowIndex * 0x38) + 0x24, MyGlow.RenderWhenOccluded);
csgo.Write<bool>(GlowObject + (GlowIndex * 0x38) + 0x25, MyGlow.RenderWhenUnoccluded);
}
else
{
cout << "NOOOOOT Same Team!" << endl;
csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0x4, EnemyGlow.R);
csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0x8, EnemyGlow.G);
csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0xC, EnemyGlow.B);
csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0x10, EnemyGlow.Alpha);
csgo.Write<bool>(GlowObject + (GlowIndex * 0x38) + 0x24, EnemyGlow.RenderWhenOccluded);
csgo.Write<bool>(GlowObject + (GlowIndex * 0x38) + 0x25, EnemyGlow.RenderWhenUnoccluded);
}
You can get rid of that if statement and use this instead.
Code:
csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0x4, Me.Team == Players[i].Team ? MyGlow.r : EnemyGlow.r);
				csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0x8, Me.Team == Players[i].Team ? MyGlow.g : EnemyGlow.g);
				csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0xC, Me.Team == Players[i].Team ? MyGlow.b : EnemyGlow.b);
				csgo.Write<float>(GlowObject + (GlowIndex * 0x38) + 0x10, Me.Team == Players[i].Team ? MyGlow.a : EnemyGlow.a);
				csgo.Write<bool>(GlowObject + (GlowIndex * 0x38) + 0x24, Me.Team == Players[i].Team ? MyGlow.RenderWhenOccluded : EnemyGlow.RenderWhenOccluded);
				csgo.Write<bool>(GlowObject + (GlowIndex * 0x38) + 0x25, Me.Team == Players[i].Team ? MyGlow.RenderWhenUnoccluded : EnemyGlow.RenderWhenUnoccluded);
#2 · edited 7y ago · 7y ago
KF1337
KF1337
Quote Originally Posted by Sandwich View Post
Code:

var.GlowPointer = ReadMem<DWORD>(ClientPanorama.dwBase + offsets.dwGlowObjectManager);
DWORD GlowObject = ReadMem<DWORD>(var.GlowPointer + i * var.GlowObjLoopDist);
I incorporated the GlowPointer already, just that i called it GlowObject:
DWORD GlowObject = csgo.Read<DWORD>(ClientPanorama.dwBaseModule + offset.dwGlowObjectManager);

You defined
Code:
DWORD GlowObject = ReadMem<DWORD>(var.GlowPointer + i * var.GlowObjLoopDist);
but I can't figure out what GlowObjLoopDist is. I was looking at the PMs, but still...did I miss where you defined this variable?

I have never used nor seen it before, so just by guessing, i would say it is the same as EntitySize = 0x10 ?
#3 · 7y ago
Not Officer
Not Officer
Try this:
Code:
void Glow()
{
	while (true)
	{
		Sleep(1);
		DROWD localPlayerAddr = csgo.Read<DWORD>(ClientPanorama.dwBaseModule + offset.dwLocalPlayer);
		
		if (localPlayerAddr == NULL)
		{
			continue;
		}
		
		int localPlayerTeamId = csgo.Read<int>(localPlayerAddr + offset.m_iTeamNum);
		
		if (localPlayerTeamId < 1 || localPlayerTeamId > 3) //localplayer has no team (1 = spec, 2 = t, 3 = ct)
		{
			continue;
		}
		
		DWORD glowObjectBase = csgo.Read<DWORD>(ClientPanorama.dwBaseModule + offset.dwGlowObjectManager);

		if (glowObjectBase == NULL)
		{
			continue;
		}

		for (int i = 0; i < 64; i++)
		{
			DWORD playerAddr = csgo.Read<DWORD>(ClientPanorama.dwBaseModule + offset.dwEntityList + i * 0x10);
			
			if (playerAddr == NULL) //player doesnt exist in entitylist
			{
				continue;
			}
			
			bool playerDormant = csgo.Read<bool>(playerAddr + offset.m_bDormant);
			
			if (playerDormant) //player is dormant => dont glow him
			{
				continue;
			}
			
			int playerHealth = csgo.Read<int>(playerAddr + offset.m_iHealth);
			
			if (playerHealth <= 0) //player is dead => dont glow him
			{
				continue;
			}		
			
			int playerTeamId = csgo.Read<int>(playerAddr + offset.m_iTeamNum);
			
			if (playerTeamId != 2 || playerTeamId != 3) //player has no team => dont glow him
			{
				continue;
			}
			
			int playerGlowIndex = csgo.Read<int>(playerAddr + offset.m_iGlowIndex);
			DROWD playerGlowAddr = glowObjectBase + playerGlowIndex * 0x38;
			
			if (localPlayerTeamId == playerTeamId)
			{
				cout << "Same Team!" << endl;
				csgo.Write<float>(playerGlowAddr + 0x4, MyGlow.R);
				csgo.Write<float>(playerGlowAddr + 0x8, MyGlow.G);
				csgo.Write<float>(playerGlowAddr + 0xC, MyGlow.B);
				csgo.Write<float>(playerGlowAddr + 0x10, MyGlow.Alpha);
				csgo.Write<bool>(playerGlowAddr + 0x24, MyGlow.RenderWhenOccluded);
				csgo.Write<bool>(playerGlowAddr + 0x25, MyGlow.RenderWhenUnoccluded);
			}
			else
			{
				cout << "NOOOOOT Same Team!" << endl;
				csgo.Write<float>(playerGlowAddr + 0x4, EnemyGlow.R);
				csgo.Write<float>(playerGlowAddr + 0x8, EnemyGlow.G);
				csgo.Write<float>(playerGlowAddr + 0xC, EnemyGlow.B);
				csgo.Write<float>(playerGlowAddr + 0x10, EnemyGlow.Alpha);
				csgo.Write<bool>(playerGlowAddr + 0x24, EnemyGlow.RenderWhenOccluded);
				csgo.Write<bool>(playerGlowAddr + 0x25, EnemyGlow.RenderWhenUnoccluded);
			}
		}
	}
}
@KF1337
#4 · 7y ago
KF1337
KF1337
I removed
Code:
if (playerTeamId != 2 || playerTeamId != 3) //player has no team => dont glow him
			{
				continue;
			}
as it gave me a warning, because it's unlogical: if teamID = 3, then it is also !=2, wich makes the if-statement true and executes "continue;" -> no player glowing at all.

BUT: if I remove the statement (as it is not necessary if I am not mistaken), the game crashes.
The "cout" statements still get printed though, but csgo crashes after the for-loop (all 64 iterations) is done.
#5 · 7y ago
Not Officer
Not Officer
Quote Originally Posted by KF1337 View Post
because it's unlogical
Oh, my bad. It must be "playerTeamId != 2 && playerTeamId != 3"
#6 · 7y ago
Sandwich
Sandwich
Quote Originally Posted by KF1337 View Post
GlowObjLoopDist
0x38 //tooshort
#7 · edited 7y ago · 7y ago
KF1337
KF1337
So I double checked every RPM/WPM operation and compared them to your examples. Should be fine now, but it is still not working.
If anyone is willing to test, here you go:
Code:
struct structGlow
{
	float R;
	float G;
	float B;
	float Alpha;
	bool RenderWhenOccluded;
	bool RenderWhenUnoccluded;
};

struct structModule
{
	DWORD dwBaseModule;
	DWORD dwSizeModule;
} ClientPanorama;

struct structEntity
{
	DWORD dwBaseEntity;
	DWORD GlowIndex;
	int Team;
	bool Dormant;
	int Health;
} Me, Players[64];


void Glow()
{
	while (true)
	{
		Sleep(1);
		Me.dwBaseEntity = csgo.Read<DWORD>(ClientPanorama.dwBaseModule + offset.dwLocalPlayer);
		Me.Team = csgo.Read<int>(Me.dwBaseEntity + offset.m_iTeamNum);
		DWORD GlowPointer = csgo.Read<DWORD>(ClientPanorama.dwBaseModule + offset.dwGlowObjectManager);
		DWORD ObjectCount = csgo.Read<DWORD>(ClientPanorama.dwBaseModule + offset.dwGlowObjectManager + 0x4);

		for (int i = 0; i < ObjectCount; i++)
		{
			Sleep(1);
			Players[i].dwBaseEntity = csgo.Read<DWORD>(ClientPanorama.dwBaseModule + offset.dwEntityList + i * 0x10);
			Players[i].Team = csgo.Read<int>(Players[i].dwBaseEntity + offset.m_iTeamNum);
			DWORD GlowIndex = csgo.Read<DWORD>(Players[i].dwBaseEntity + offset.m_iGlowIndex);
			DWORD GlowObject = csgo.Read<DWORD>(GlowPointer + i * 0x38);

			if (Players[i].dwBaseEntity == 0) //Checks if the player entity exists
			{
				continue;
			}

			Players[i].Dormant = csgo.Read<bool>(Players[i].dwBaseEntity + offset.m_bDormant);
			if (Players[i].Dormant == true) //Checks if player is dormant = not rendered
			{
				continue;
			}

			Players[i].Health = csgo.Read<int>(Players[i].dwBaseEntity + offset.m_iHealth);
			if (Players[i].Health <= 0) //Checks if player is dead
			{
				continue;
			}

			if (Players[i].Team != 2 && Players[i].Team != 3) //Checks if the player has a team (Spectator: 1,  CT: 2,  T: 3)
			{
				continue;
			}

			if (Me.Team == Players[i].Team)
			{
				csgo.Write<float>(GlowPointer + (GlowIndex * 0x38) + 0x4, MyGlow.R);
				csgo.Write<float>(GlowPointer + (GlowIndex * 0x38) + 0x8, MyGlow.G);
				csgo.Write<float>(GlowPointer + (GlowIndex * 0x38) + 0xC, MyGlow.B);
				csgo.Write<float>(GlowPointer + (GlowIndex * 0x38) + 0x10, MyGlow.Alpha);
				csgo.Write<bool>(GlowPointer + (GlowIndex * 0x38) + 0x24, MyGlow.RenderWhenOccluded);
				csgo.Write<bool>(GlowPointer + (GlowIndex * 0x38) + 0x25, MyGlow.RenderWhenUnoccluded);
			}
			else
			{
				cout << Players[i].GlowIndex << endl;
				csgo.Write<float>(GlowPointer + (GlowIndex * 0x38) + 0x4, EnemyGlow.R);
				csgo.Write<float>(GlowPointer + (GlowIndex * 0x38) + 0x8, EnemyGlow.G);
				csgo.Write<float>(GlowPointer + (GlowIndex * 0x38) + 0xC, EnemyGlow.B);
				csgo.Write<float>(GlowPointer + (GlowIndex * 0x38) + 0x10, EnemyGlow.Alpha);
				csgo.Write<bool>(GlowPointer + (GlowIndex * 0x38) + 0x24, EnemyGlow.RenderWhenOccluded);
				csgo.Write<bool>(GlowPointer + (GlowIndex * 0x38) + 0x25, EnemyGlow.RenderWhenUnoccluded);
			}
		}
	}
}
If you actually get this to work, it must be my Read/Write implementation.
#8 · 7y ago
Sandwich
Sandwich
Quote Originally Posted by KF1337 View Post
So I double checked every RPM/WPM operation and compared them to your examples. Should be fine now, but it is still not working.
If anyone is willing to test, here you go:
Code:
struct structGlow
{
	float R,
    G,
    B,
    Alpha;
	bool RenderWhenOccluded,
    RenderWhenUnoccluded;
};

struct structModule
{
	DWORD dwBaseModule,
    dwSizeModule;
} ClientPanorama;

struct structEntity
{
	DWORD dwBaseEntity;
	int GlowIndex,
    Team,
    Health;
	bool Dormant;
} Me, Players[64];


void Glow()
{
	while (true)
	{
		Me.dwBaseEntity = csgo.Read<DWORD>(ClientPanorama.dwBaseModule + offset.dwLocalPlayer);
		Me.Team = csgo.Read<int>(Me.dwBaseEntity + offset.m_iTeamNum);
		DWORD GlowPointer = csgo.Read<DWORD>(ClientPanorama.dwBaseModule + offset.dwGlowObjectManager);
		int ObjectCount = csgo.Read<int>(ClientPanorama.dwBaseModule + offset.dwGlowObjectManager + 0x4);

		for (auto i = 0; i < ObjectCount; i++)
		{
			Players[i].dwBaseEntity = csgo.Read<DWORD>(ClientPanorama.dwBaseModule + offset.dwEntityList + i * 0x10);
			Players[i].Team = csgo.Read<int>(Players[i].dwBaseEntity + offset.m_iTeamNum);
			Players[i].GlowIndex = csgo.Read<int>(Players[i].dwBaseEntity + offset.m_iGlowIndex);
			DWORD GlowObject = csgo.Read<DWORD>(GlowPointer + i * 0x38);

			if (Players[i].dwBaseEntity == 0) //Checks if the player entity exists
				continue;

			Players[i].Dormant = csgo.Read<bool>(Players[i].dwBaseEntity + offset.m_bDormant);
            
			if (Players[i].Dormant) //Checks if player is dormant = not rendered
				continue;

			Players[i].Health = csgo.Read<int>(Players[i].dwBaseEntity + offset.m_iHealth);
            
			if (Players[i].Health <= 0) //Checks if player is dead
				continue;

			if (Players[i].Team != 2 &&
            Players[i].Team != 3) //Checks if the player has a team (Spectator: 1,  CT: 2,  T: 3)
				continue;

            csgo.Write<float>(GlowObject + (Players[i].GlowIndex * 0x38) + 0x4, Me.Team == Players[i].Team ? MyGlow.r : EnemyGlow.r);
			csgo.Write<float>(GlowObject + (Players[i].GlowIndex * 0x38) + 0x8, Me.Team == Players[i].Team ? MyGlow.g : EnemyGlow.g);
			csgo.Write<float>(GlowObject + (Players[i].GlowIndex * 0x38) + 0xC, Me.Team == Players[i].Team ? MyGlow.b : EnemyGlow.b);
			csgo.Write<float>(GlowObject + (Players[i].GlowIndex * 0x38) + 0x10, Me.Team == Players[i].Team ? MyGlow.a : EnemyGlow.a);
			csgo.Write<bool>(GlowObject + (Players[i].GlowIndex * 0x38) + 0x24, Me.Team == Players[i].Team ? MyGlow.RenderWhenOccluded : EnemyGlow.RenderWhenOccluded);
			csgo.Write<bool>(GlowObject + (Players[i].GlowIndex * 0x38) + 0x25, Me.Team == Players[i].Team ? MyGlow.RenderWhenUnoccluded : EnemyGlow.RenderWhenUnoccluded);    
		}
	}
}
GlowIndex and ObjCount are integers.
#9 · edited 7y ago · 7y ago
KF1337
KF1337
Unfortunately, it didn't change anything. Been working on this the last 2 days now and I am still clueless

Debugger says "access violation for writing" at

Code:
Players[i].Health = csgo.Read<int>(Players[i].dwBaseEntity + offset.m_iHealth);
So I did " cout << Players[i].dwBaseEntity;" just out of curiousity. It turned out that it outputs just a long int like 0435788345. It is supposed to be a hex memory address, right? Or is the above number just the decimal of the hex address?

(Actually I slightly lost track of all the memory operations tbh, it is still a new thing for me)
#10 · 7y ago
Sandwich
Sandwich
@KF1337
Are your offsets correct?
Code:
dwLocalPlayer = 0xCF1A3C,
dwEntityList = 0x4D03AE4,
dwGlowObjectManager = 0x5243EB0,
m_iTeamNum = 0xF4,
m_iHealth = 0x100,
m_iGlowIndex = 0xA40C,
Dormant = 0xED;
#11 · 7y ago
Not Officer
Not Officer
GlowObjectCount isnt the entitylist size. Use 64 for now.
#12 · 7y ago
defaulto
defaulto
64 isn't necessarily tough. 32 should be fine too.
I think no official Server got more than 24 (?) Players in them.
Correct me if I am wrong.
#13 · 7y ago
KF1337
KF1337
Quote Originally Posted by Sandwich View Post
Are your offsets correct?
Updated after last nights csgo update

Quote Originally Posted by OfficerX View Post
GlowObjectCount isnt the entitylist size. Use 64 for now.
Using 64 iterations now.

-> Still no glow.
I might be on the wrong track, but is something wrong with the templates?
Code:
//Read / RPM function template
	template <class T>
	T Read(DWORD MemoryAddress)
	{
		T ReadOutput;
		ReadProcessMemory(hProcess, (LPVOID)MemoryAddress, &ReadOutput, sizeof(T), NULL);
		return ReadOutput;
	}

	//Write / WPM function template
	template <class T>
	bool Write(DWORD MemoryAddress, T WriteInput)
	{
		if (WriteProcessMemory(hProcess, (LPVOID)MemoryAddress, &WriteInput, sizeof(T), NULL) == true)
		{
			return true;
		}
		else
		{
			return false;
		}
	}
#14 · 7y ago
Sandwich
Sandwich
Quote Originally Posted by KF1337 View Post
/Write / WPM function template
template <class T>
bool Write(DWORD MemoryAddress, T WriteInput)
{
if (WriteProcessMemory(hProcess, (LPVOID)MemoryAddress, &WriteInput, sizeof(T), NULL) == true)
{
return true;
}
else
{
return false;
}
}
Code:
template <class t>
	void Write(const DWORD address, const t x)
	{
		WriteProcessMemory(hProcess, (LPBYTE*)address, &x, sizeof(x), NULL);
	}
When you are writing to memory, not every variable is a boolean so the if statement is useless.
Quote Originally Posted by KF1337 View Post
template <class T>
T Read(DWORD MemoryAddress)
{
T ReadOutput;
ReadProcessMemory(hProcess, (LPVOID)MemoryAddress, &ReadOutput, sizeof(T), NULL);
return ReadOutput;
}
Code:
template <class t>
	t Read(const DWORD address)
	{
		t x;
		ReadProcessMemory(hProcess, (LPBYTE*)address, &x, sizeof(x), NULL);
		return x;
	}
Don't use the class size to read memory.

UPDATE:
Code:
//Try this and see if it works. I coded it in notepad so you may need to debug it.
void Glow()
{
	while (true)
	{
		Me.dwBaseEntity = csgo.Read<DWORD>(ClientPanorama.dwBaseModule + offset.dwLocalPlayer);
		Me.Team = csgo.Read<int>(Me.dwBaseEntity + offset.m_iTeamNum);
		DWORD GlowPointer = csgo.Read<DWORD>(ClientPanorama.dwBaseModule + offset.dwGlowObjectManager);
		int ObjectCount = csgo.Read<int>(ClientPanorama.dwBaseModule + offset.dwGlowObjectManager + 0x4);

		for (auto i = 0; i < ObjectCount; i++)
		{
			DWORD GlowObject = csgo.Read<DWORD>(GlowPointer + i * 0x38);
			if (GlowObject == NULL) //Checks if the player entity exists
				continue;
                
            Players[i].Team = csgo.Read<int>(GlowObject + offset.m_iTeamNum);

            if (Players[i].Team != 2 &&
            Players[i].Team != 3) //Checks if the player has a team (Spectator: 1,  CT: 2,  T: 3)
				continue;
                
			Players[i].Dormant = csgo.Read<bool>(GlowObject + offset.m_bDormant);
            
			if (Players[i].Dormant) //Checks if player is dormant = not rendered
				continue;

			Players[i].Health = csgo.Read<int>(GlowObject + offset.m_iHealth);
            
			if (Players[i].Health <= 0) //Checks if player is dead
				continue;

            csgo.Write<float>(GlowObject + (i * 0x38) + 0x4, Me.Team == Players[i].Team ? MyGlow.r : EnemyGlow.r);
			csgo.Write<float>(GlowObject + (i * 0x38) + 0x8, Me.Team == Players[i].Team ? MyGlow.g : EnemyGlow.g);
			csgo.Write<float>(GlowObject + (i * 0x38) + 0xC, Me.Team == Players[i].Team ? MyGlow.b : EnemyGlow.b);
			csgo.Write<float>(GlowObject + (i * 0x38) + 0x10, Me.Team == Players[i].Team ? MyGlow.a : EnemyGlow.a);
			csgo.Write<bool>(GlowObject + (i * 0x38) + 0x24, Me.Team == Players[i].Team ? MyGlow.RenderWhenOccluded : EnemyGlow.RenderWhenOccluded);
			csgo.Write<bool>(GlowObject + (i * 0x38) + 0x25, Me.Team == Players[i].Team ? MyGlow.RenderWhenUnoccluded : EnemyGlow.RenderWhenUnoccluded);    
		}
	}
}
#15 · edited 7y ago · 7y ago
Posts 1–15 of 18 · Page 1 of 2

Post a Reply

Similar Threads

  • Hack Function not working after leaving the roomBy antep2727 in Counter-Strike 2 Coding & Resources
    6Last post 10y ago
  • Getting free Fitbits with cracked accounts not working anymore for the U.S.By DJEZ0103 in General Hacking
    2Last post 8y ago
  • AHK not working (none of the fishing bots)By Ex3cutioner in Trove Discussions & Help
    7Last post 10y ago
  • Hack Not Working [ I found the problem ]By H3ll King in CrossFire Help
    3Last post 15y ago
  • the hack does not work in the ca euBy Massimo1993 in Combat Arms Hacks & Cheats
    2Last post 17y ago

Tags for this Thread

#coding#counter strike#csgo#esp#glow#hack