Item ESP

Posts 1–4 of 4 · Page 1 of 1
Item ESP
Hi guys! I'd like to make item glow esp I used this code:
Code:
#include"Infinity.h"
struct GlowObjectDef_t
{
	DWORD dwBase;
	float r;
	float g;
	float b;
	float a;
	uint8_t unk1[8];
	float m_flBloomAmount;
	uint8_t unk2[4];
	bool m_bRenderWhenOccluded;
	bool m_bRenderWhenUnoccluded;
	bool m_bFullBloom;
	int m_nFullBloomStencil;
	uint8_t unk3[10];
};

void ShowIt(DWORD mObj, float r, float g, float b, float a, float blm, bool bih) {
	Mem.Write<float>(mObj + 0x4, r);
	Mem.Write<float>(mObj + 0x8, g);
	Mem.Write<float>(mObj + 0xC, b);
	Mem.Write<float>(mObj + 0x10, a);
	Mem.Write<BOOL>(mObj + 0x24, true);
	Mem.Write<BOOL>(mObj + 0x25, false);
}

void tGlow::Start()
{
	while (true) {
		if(Glow && show_plant || Glow && show_obj || Glow && show_grenades){
			pointerGlow = Mem.Read<DWORD>(Mem.Client() + Offsets.m_dwGlowObject);
			objectCount = Mem.Read<DWORD>(Mem.Client() + Offsets.m_dwGlowObject + 0x4);
			if (pointerGlow != NULL && objectCount > 0) {
				for (int i = 0; i < (objectCount + 1); i++) {
					DWORD mObj = pointerGlow + i * sizeof(GlowObjectDef_t);
					GlowObjectDef_t glowObj = Mem.Read<GlowObjectDef_t>(mObj);
					bool objectdormant = Mem.Read<bool>(glowObj.dwBase + Offsets.m_bDormant);
					int el = Mem.Read<int>(glowObj.dwBase + 0x8);
					int iz = Mem.Read<int>(el + 2 * 0x4);
					int abt = Mem.Read<int>(iz + 1);
					int classid = Mem.Read<int>(abt + 20); 
					if (show_plant && glowObj.dwBase != 0 && !objectdormant && (classid == 107 || classid == 29)) {
						ShowIt(mObj, 0.4f, 0.f, 0.4f, 1.5f, 0, false);
					}
					if (show_obj && glowObj.dwBase != 0 && !objectdormant && (classid == 1 || classid == 212 || classid == 125 || classid == 219 || classid == 203)) {
						ShowIt(mObj, 0.f, 0.f, 0.4f, 1.f, 0, false);
					}
					if (show_grenades && glowObj.dwBase != 0 && !objectdormant && (classid == 9 || classid == 8 || classid == 96 || classid == 97 || classid == 131 || classid == 132)) {
						ShowIt(mObj, 0.48f, 0.98f, 0.f, 1.f, 0, false);
					}
				}
			}
		}
	}
}
But when I add this code CPU usage increased by 2 times, and finaly after 1-2 week I was Untrusted-banned. What is wrong with this code?
For the CPU usage its probably because it keeps looping constantly. Adding Sleep(1); to the function will help with that problem.
learn c++ and how to use a struct efficiently
I know why cheat use a lot of resources but why I have untrusted ban for this code?
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us