C# External Glow ESP drawing ugly boxes ???!!!
Hi everyone.
I'm trying to make an ESP working.
It is sometime drawing boxes but i don't know why. That's ugly.
[IMG]https://cdn.*******app.com/attachments/442296329750970378/442312059527626762/Sans_titre.png[/IMG]
thanks in advance
I'm trying to make an ESP working.
It is sometime drawing boxes but i don't know why. That's ugly.
[IMG]https://cdn.*******app.com/attachments/442296329750970378/442312059527626762/Sans_titre.png[/IMG]
Code:
public void Start()
{
while (running)
{
Thread.Sleep(20);
int i = 1;
int address;
do
{
EnemyTeam.r = 1;
EnemyTeam.g = 0;
EnemyTeam.b = 0;
Team.r = 0;
Team.g = 1;
Team.b = 0;
address = Base + Offsets.BasePlayer;
int Player = Memory.Read<int>((IntPtr)address);
address = Player + Offsets.teamNumOffset;
int MyTeam = Memory.Read<int>((IntPtr)address);
address = Base + Offsets.dwEntityList + (i - 1) * 0x10;
int EntityList = Memory.Read<int>((IntPtr)address);
address = EntityList + Offsets.teamNumOffset;
int OpponentTeam = Memory.Read<int>((IntPtr)address);
address = EntityList + Offsets.m_Dormant;
if (!Memory.Read<bool>((IntPtr)address))
{
address = EntityList + Offsets.m_iGlowIndex;
int GlowIndex = Memory.Read<int>((IntPtr)address);
if (glowHealth)
{
address = EntityList + Offsets.m_iHealth;
int health = Memory.Read<int>((IntPtr)address);
if (MyTeam != OpponentTeam)
{
if (health >= 75)
{
EnemyTeam.r = 0;
EnemyTeam.g = 1;
EnemyTeam.b = 0;
}
else if (health >= 30 && health <= 75)
{
EnemyTeam.r = 1;
EnemyTeam.g = 1;
EnemyTeam.b = 0;
}
else
{
EnemyTeam.r = 1;
EnemyTeam.g = 0;
EnemyTeam.b = 0;
}
EnableGlow(GlowIndex, EnemyTeam);
}
else
{
if (glowAllPlayers)
{
Team.r = 1;
Team.g = 1;
Team.b = 0;
EnableGlow(GlowIndex, Team);
}
}
}
else
{
if (MyTeam == OpponentTeam)
{
if (glowAllPlayers)
{
EnableGlow(GlowIndex, Team);
}
}
else
{
EnableGlow(GlowIndex, EnemyTeam);
}
}
}
i++;
} while (i < 65);
}
}
private void EnableGlow(int GlowIndex, Glow_T team)
{
int address = Base + Offsets.dwGlowObjectManager;
int GlowObject = Memory.Read<int>((IntPtr)address);
int calculation = GlowIndex * 0x38 + 0x4;
int current = GlowObject + calculation;
Memory.Write<float>((IntPtr)current, team.r);
calculation = GlowIndex * 0x38 + 0x8;
current = GlowObject + calculation;
Memory.Write<float>((IntPtr)current, team.g);
calculation = GlowIndex * 0x38 + 0xC;
current = GlowObject + calculation;
Memory.Write<float>((IntPtr)current, team.b);
calculation = GlowIndex * 0x38 + 0x10;
current = GlowObject + calculation;
Memory.Write<float>((IntPtr)current, team.a);
calculation = GlowIndex * 0x38 + 0x24;
current = GlowObject + calculation;
Memory.Write<bool>((IntPtr)current, team.rwo);
calculation = GlowIndex * 0x38 + 0x25;
current = GlowObject + calculation;
Memory.Write<bool>((IntPtr)current, team.rwuo);
}