for (int h = 0; h < 64; h++){
int PB = PP.GetBaseEntity(h);
int lif = PP.Getheal(PB);
if (lif <= 100 && lif >= 85) {
vme = 0;
vre = 255;
aze = 0;
}
else if (lif < 85 && lif >= 50) {
vme = 255;
vre = 255;
aze = 0;
}
}
while(true){
//your code
}
while (IsRunning) {
// Your code for looping over the Player BaseEntities
// When Key END is pressed, terminate while loop
if (GetAsyncKeyState(VK_END)) {
IsRunning = false;
}
}

bool bIsRunning = true;
DWORD WINAPI XRay(LPVOID lpParameter){
while (bIsRunning){
// Do XRay
Sleep(1);
}
ExitThread(1);
}

for(int i = 0; i < 64; i++){
DWORD PB = PP.GetBaseEntity(i); PB = (PLAYERBASE = PLAYER.GetBaseEntity(i)) = mem.Read<DWORD>(modClient.dwBase + offEntityList + (offEntitySize * i)); //THIS RETURNS BASE ENTITY TO PB
int life = PP.Getheal(PB); LIFE = PLAYER LIFE IN THE LOOP = Player.GetHealth(PB) = bet = mem.Read<int>(BaseEntity + 0x000000FC); //BASE ENTITY = PB + PLAYERHEALTHOFFSET
if (life <= 100 && life >= 85) { //CHECKS IF OK CHANGE
vme = 0; //RED
vre = 255; //GREEN
aze = 0; //BLUE
}
else if (life < 85 && life >= 50) { //CHECKS IF OK CHANGE
vme = 255; //RED
vre = 255; //GREEN
aze = 0; //BLUE
}
}
}
void ESPfunction()
{
while (bEspEnabled) // if you want to stop it with a key do while (!GetAsyncKeyState(VK_END)) etc.
{
for(int i = 0; i < 64; i++)
{
DWORD PB = PP.GetBaseEntity(i);....
int life = PP.Getheal(PB); ...
if (life <= 100 && life >= 85) { //CHECKS IF OK CHANGE
vme = 0; //RED
vre = 255; //GREEN
aze = 0; //BLUE
}
else if (life < 85 && life >= 50) { //CHECKS IF OK CHANGE
vme = 255; //RED
vre = 255; //GREEN
aze = 0; //BLUE
}
}
Sleep(1); //to reduce CPU usage of course
}
}
DWORD mObj = pointerGlow + i * sizeof(GlowObjectDefinition_t);
GlowObjectDefinition_t glowObj = mem.Read<GlowObjectDefinition_t>(mObj);
if (glowObj.pEntity != NULL) {
bool dormant = mem.Read<int>(glowObj.pEntity + 0xE9);
if (!dormant) {
for (int j = 0; j < 64; j++)
{
DWORD PB = PP.GetBaseEntity(i);
int life = PP.Getheal(PB);
if (life <= 100 && life >= 85) { //CHECKS IF OK CHANGE
vme = 0; //RED
vre = 255; //GREEN
aze = 0; //BLUE
}
else if (life < 85 && life >= 50) { //CHECKS IF OK CHANGE
vme = 255; //RED
vre = 255; //GREEN
aze = 0; //BLUE
}
}
int team = mem.Read<int>(glowObj.pEntity + 0xF0);
if (team != me.team) {
DrawGlow(mObj, a, b, c, m);
}
else {
DrawGlow(mObj, d, e, f, m);
}
}
}