UnhappyHELP

Posts 1–2 of 2 · Page 1 of 1
HELP
I do not know why . All the players did not show the 10 people playing now one of them does not show

Code:
#ifndef ESP_H
#define ESP_H
 
#include "Engine.h"
#include "Settings.h"
 
struct GlowObjectDefinition_t
{
    DWORD dwBase;
    float r;
    float g;
    float b;
    float a;
    uint8_t unk1[16];
    bool m_bRenderWhenOccluded;
    bool m_bRenderWhenUnoccluded;
    bool m_bFullBloom;
    uint8_t unk2[14];
};
 
class ESP {
[junk_enable /]
 
public: 
	void run() {
        [swap_lines]
		int objectCount;
		DWORD pointerGlow;
		float playerhp;
		bool enemyHealthBased  = Settings()->esp_enemyhealth;
		bool friendHealthBased = Settings()->esp_friendhealth;
        float alphaFriend = sanitizeChannel(Settings()->esp_friend);
        float alphaEnemy  = sanitizeChannel(Settings()->esp_enemy);
        float alphaInX    = sanitizeChannel(Settings()->esp_enemyInX);
        [/swap_lines]
        if (!(Settings()->esp_key || Settings()->espEnabled)) {
            return;
        }
		while (true) {
            [add_junk /]
            if (!Settings()->espEnabled) {
                Sleep(3000);
                continue;
			}
            [add_junk /]
            pointerGlow = Engine()->Memory()->Read<DWORD>(Engine()->getClientModule()->dwBase + Engine()->Offsets()->dwGlow);
            objectCount = Engine()->Memory()->Read<DWORD>(Engine()->getClientModule()->dwBase + Engine()->Offsets()->dwGlow + 0x4);
            if (!(pointerGlow != NULL && objectCount > 0)) {
                Sleep(3000);
                continue;
            }
            [add_junk /]
            for (int i = 0; i < objectCount; i++) {
                [add_junk /]
                DWORD mObj = pointerGlow + (i * sizeof(GlowObjectDefinition_t));
                GlowObjectDefinition_t glowObj = Engine()->Memory()->Read<GlowObjectDefinition_t>(mObj);
                Entity* Player = Engine()->getEntityByBase(glowObj.dwBase);
                if (!(glowObj.dwBase && Player && !Player->is_dormant && Player->is_alive)) {
                    continue;
                }
                [add_junk /]
                // Player->hp can be greater than 100.0f on custom servers.
                playerhp = Player->hp >= 100 ? 100.0f : (float) Player->hp / 100.0f;
                if (Engine()->me.team == Player->team) {
                    glowPlayer(glowObj, 0, friendHealthBased ? (Player->hp > 75 ? 1 : playerhp * 0.75f) : 0, 1, alphaFriend);
                } else if (inCrosshair(Player->id)) {
                    glowPlayer(glowObj, 0, 1, 0, alphaInX);
                } else {
                    glowPlayer(glowObj, 1, enemyHealthBased ? (Player->hp > 75 ? 1 : playerhp * 0.75f) : 0, 0, alphaEnemy);
                }
                Engine()->Memory()->Write<GlowObjectDefinition_t>(mObj, glowObj);
                [add_junk /]
            }
            [add_junk /]
			Sleep(1);
		}
		[add_junk /]
	}
 
private:
    void glowPlayer(GlowObjectDefinition_t &glowObj, float r, float g, float b, float a) {
        [swap_lines]
        glowObj.r = r;
        glowObj.g = g;
        glowObj.b = b;
        glowObj.a = a;
        glowObj.m_bRenderWhenOccluded = true;
        //glowObj.m_bRenderWhenUnoccluded = false;
        //glowObj.m_bFullBloom = false;
        [/swap_lines]
    }
	bool inCrosshair(int mObjId) {
		[add_junk /]
		int idInX = Engine()->Memory()->Read<int>(Engine()->me.dwBase + Engine()->Offsets()->dwInCross);
		return (idInX == mObjId);
	}
	float sanitizeChannel(int value) {
        [swap_lines]
        if (value > 255) value = 255;
        if (value < 0) value = 0;
        [/swap_lines]
        return (float) value / 255;
	}
 
[junk_disable /]
};
 
#endif
/Moved to the correct section.
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us