Gonna post the full code cus who cares?
Code:
namespace Purepaste // lets see the funny guys posting about the name haha
{
class Glow
{
public static PPMemory PPM = new PPMemory(Vars.pro);
private static bool one;
public static int i = 0;
public static int Enemy;
public static int ehealth = 0;
private static void DrawGlow(int pGlowIn, GlowStruct col) // Função do WallHack
{
if (i > 20)
{
}
int objectValue = PPM.ReadInt32((IntPtr)Vars.bClient + Vars.GlowObject);
pGlowIn = objectValue + (pGlowIn * 0x38);
if (i < 64)
{
i++;
Enemy = PPM.ReadInt32((IntPtr)Vars.bClient + Vars.EntList + i * 0x10);
ehealth = PPM.ReadInt32((IntPtr)Enemy + Vars.Health);
}
PPM.WriteFloat((IntPtr)pGlowIn + 0x4, (float)(255 - 2.55 * ehealth) / 255.0f);
PPM.WriteFloat((IntPtr)pGlowIn + 0x8, (float)(2.55 * ehealth) / 255.0f);
PPM.WriteFloat((IntPtr)pGlowIn + 0xC, (float)col.b);
PPM.WriteFloat((IntPtr)pGlowIn + 0x10, col.a);
PPM.WriteBoolean((IntPtr)pGlowIn + 0x24, col.rwo);
PPM.WriteBoolean((IntPtr)pGlowIn + 0x25, col.rwuo);
i = 0;
}
public static void Glow2()
{
if (Vars.EnemyRainbow == true && Vars.glowenemyenabled)
{
Vars.glow_enemy_r = 255;
Vars.glow_enemy_g = 0;
Vars.glow_enemy_b = 0;
}
if (Vars.TeamRainbow == true && Vars.glowteamenabled)
{
Vars.glow_team_r = 255;
Vars.glow_team_g = 0;
Vars.glow_team_b = 0;
}
try
{
while (Vars.GlowActive == true)
{
if (Vars.GlowAlways == true || Vars.GetKeyState(Vars.GlowButton) == 0)
{
if (Vars.EnemyRainbow == true && Vars.glowenemyenabled)
{
EnemyColor();
}
if (Vars.TeamRainbow == true && Vars.glowteamenabled)
{
TeamColor();
}
if (one == false && Vars.BeepEnable == true)
{
Console.Beep(3000, 120);
Console.Beep(3000, 120);
one = true;
}
GlowStruct col = new GlowStruct
{
r = (double)((Vars.glow_enemy_r) / 255.0),
g = (double)((Vars.glow_enemy_g) / 255.0),
b = (double)((Vars.glow_enemy_b) / 255.0),
a = (int)(((double)Vars.glow_alpha) / 255.0),
rwo = true,
rwuo = false
};
GlowStruct struct3 = new GlowStruct
{
r = (double)((Vars.glow_team_r) / 255.0),
g = (double)((Vars.glow_team_g) / 255.0),
b = (double)((Vars.glow_team_b) / 255.0),
a = (int)(((double)Vars.glow_alpha) / 255.0),
rwo = true,
rwuo = false
};
if (Vars.glowenemyenabled | Vars.glowteamenabled)
{
int num2;
int num = 1;
do
{
int objectValue = PPM.ReadInt32((IntPtr)Vars.bClient + Vars.offLocalp);
int left = PPM.ReadInt32((IntPtr)(Vars.bClient + Vars.EntList) + ((num - 1) * 0x10));
if (Convert.ToBoolean(Operators.NotObject(RuntimeHelp ers.GetObjectValue(PPM.ReadBoolean((IntPtr)Convert .ToInt32(Operators.AddObject(left, Vars.Dormant)))))))
{
var obj5 = PPM.ReadInt32((IntPtr)left + Vars.GlowIndex);
var obj6 = PPM.ReadInt32((IntPtr)left + Vars.Team);
var right = PPM.ReadInt32((IntPtr)objectValue + Vars.Team);
if (Operators.ConditionalCompareObjectEqual(obj6, right, false))
{
if (Vars.glowteamenabled)
{
DrawGlow(Convert.ToInt32(obj5), struct3);
}
}
else
{
if (Vars.glowenemyenabled)
{
DrawGlow(Convert.ToInt32(obj5), col);
}
}
}
num++;
num2 = 0x40;
Thread.Sleep(1);
}
while (num <= num2);
}
}
else
{
if (one == true && Vars.BeepEnable == true)
{
Console.Beep(3000, 200);
one = false;
}
}
Thread.Sleep(1);
}
}
catch (Exception e)
{
Config.Erro(e);
}
}
public struct GlowStruct
{
public double r;
public double g;
public double b;
public int a;
public bool rwo;
public bool rwuo;
}
static int statee = 0;
static int statet = 0;
static void EnemyColor()
{
if (statee <= 0)
{
Vars.glow_enemy_g += Vars.EnemySpeed;
if (Vars.glow_enemy_g >= 255)
statee = 1;
}
if (statee == 1)
{
Vars.glow_enemy_r -= Vars.EnemySpeed;
if (Vars.glow_enemy_r <= 0)
statee = 2;
}
if (statee == 2)
{
Vars.glow_enemy_b += Vars.EnemySpeed;
if (Vars.glow_enemy_b >= 255)
statee = 3;
}
if (statee == 3)
{
Vars.glow_enemy_g -= Vars.EnemySpeed;
if (Vars.glow_enemy_g <= 0)
statee = 4;
}
if (statee == 4)
{
Vars.glow_enemy_r += Vars.EnemySpeed;
if (Vars.glow_enemy_r >= 255)
statee = Vars.EnemySpeed;
}
if (statee == Vars.EnemySpeed)
{
Vars.glow_enemy_b -= Vars.EnemySpeed;
if (Vars.glow_enemy_b <= 0)
statee = 0;
}
}
static void TeamColor()
{
if (statet <= 0)
{
Vars.glow_team_g += Vars.TeamSpeed;
if (Vars.glow_team_g >= 255)
statet = 1;
}
if (statet == 1)
{
Vars.glow_team_r -= Vars.TeamSpeed;
if (Vars.glow_team_r <= 0)
statet = 2;
}
if (statet == 2)
{
Vars.glow_team_b += Vars.TeamSpeed;
if (Vars.glow_team_b >= 255)
statet = 3;
}
if (statet == 3)
{
Vars.glow_team_g -= Vars.TeamSpeed;
if (Vars.glow_team_g <= 0)
statet = 4;
}
if (statet == 4)
{
Vars.glow_team_r += Vars.TeamSpeed;
if (Vars.glow_team_r >= 255)
statet = Vars.TeamSpeed;
}
if (statet == Vars.TeamSpeed)
{
Vars.glow_team_b -= Vars.TeamSpeed;
if (Vars.glow_team_b <= 0)
statet = 0;
}
}
}
}
i get the problem is declaring 0 everytime in the function but that's what happens when i put it to declare only when checked all players.
now with that problem fixed...
Code:
if (i < 64)
{
i++;
}
if (i > 20)
{
i = 0;//problem fixed
}
int Mteam = PPM.ReadInt32((IntPtr)Vars.Localplayer + Vars.Team);
int eteam = PPM.ReadInt32((IntPtr)Vars.EntList + Vars.Team);
int objectValue = PPM.ReadInt32((IntPtr)Vars.bClient + Vars.GlowObject);
pGlowIn = objectValue + (pGlowIn * 0x38);
Enemy = PPM.ReadInt32((IntPtr)Vars.bClient + Vars.EntList + i * 0x10);
ehealth = PPM.ReadInt32((IntPtr)Enemy + Vars.Health);
if (ehealth > 0 && eteam != Mteam)//added for checking if alive and if isnt in the team
{
PPM.WriteFloat((IntPtr)pGlowIn + 0x4, (float)(255 - 2.55 * ehealth) / 255.0f);
PPM.WriteFloat((IntPtr)pGlowIn + 0x8, (float)(2.55 * ehealth) / 255.0f);
PPM.WriteFloat((IntPtr)pGlowIn + 0xC, (float)col.b);
PPM.WriteFloat((IntPtr)pGlowIn + 0x10, col.a);
PPM.WriteBoolean((IntPtr)pGlowIn + 0x24, col.rwo);
PPM.WriteBoolean((IntPtr)pGlowIn + 0x25, col.rwuo);
}
the other error is that it is indeed checking for all players and it is glowing it properly health but its glowing the health randomly
I KNOW ITS FLASHING A LOT BUT IM GONNA FIX THAT LATER
all the time on all players and it is getting the health from players from my team. so how do i fix that ? the random health glow thing and getting the health from my team