ESP crashing polyhack

Posts 18 of 8 · Page 1 of 1
ESP crashing polyhack
my box esp is crashing my polyhack but when its a normal compiled version, it doesn't crash it, can someone help?
esp code
Code:
bool WorldToScreenM(float * from, float * to) {
	[add_junk /]	
	WorldToScreenMatrix_t WorldToScreenMatrix;
	WorldToScreenMatrix = Nsane.Read<WorldToScreenMatrix_t>(Client + ViewMatrix);
	[add_junk /]
	float w = 0.0f;
	[add_junk /]
	to[0] = WorldToScreenMatrix.flMatrix[0][0] * from[0] + WorldToScreenMatrix.flMatrix[0][1] * from[1] + WorldToScreenMatrix.flMatrix[0][2] * from[2] + WorldToScreenMatrix.flMatrix[0][3];
	to[1] = WorldToScreenMatrix.flMatrix[1][0] * from[0] + WorldToScreenMatrix.flMatrix[1][1] * from[1] + WorldToScreenMatrix.flMatrix[1][2] * from[2] + WorldToScreenMatrix.flMatrix[1][3];
	w = WorldToScreenMatrix.flMatrix[3][0] * from[0] + WorldToScreenMatrix.flMatrix[3][1] * from[1] + WorldToScreenMatrix.flMatrix[3][2] * from[2] + WorldToScreenMatrix.flMatrix[3][3];
	[add_junk /]
	if (w < 0.01f)
		return false;
	[add_junk /]
	float invw = 1.0f / w;
	to[0] *= invw;
	to[1] *= invw;
	[add_junk /]
	int width = (int)(OurWindow.right - OurWindow.left);
	int height = (int)(OurWindow.bottom - OurWindow.top);
	[add_junk /]
	float x = width / 2;
	float y = height / 2;
	[add_junk /]
	x += 0.5 * to[0] * width + 0.5;
	y -= 0.5 * to[1] * height + 0.5;
	[add_junk /]
	to[0] = x + OurWindow.left; // Our Window :) Remember? The RECT Function XPPP
	to[1] = y + OurWindow.top;
	[add_junk /]
	return true;
}

float Get3D(float X, float Y, float Z, float eX, float eY, float eZ)
{
	[add_junk /]
	return(sqrtf((eX - X) * (eX - X) + (eY - Y) * (eY - Y) + (eZ - Z) * (eZ - Z)));
	[add_junk /]
}
void ESP()
{
	[add_junk /]
	BoxESPEnabledFunction = true;
	if (BoxESPEnabled)
	{
		[add_junk /]
		for (int i = 0; i < 32; i++) {
			[add_junk /]
			EnemyPlayer[i].ReadInfo(i);
			TeamPlayer[i].ReadInfo(i);
			SimplePlayer.ReadInfo();
			[add_junk /]
			if (EnemyPlayer[i].TeamNum != 2 && EnemyPlayer[i].TeamNum != 3)
				continue;
			[add_junk /]
			if (EnemyPlayer[i].Dormant)
				continue; //Ghost Boxes? No!
			[add_junk /]
			if (EnemyPlayer[i].Health < 1)
				continue; // THERE IS AN NEW UPDATE, 2 is no longer = Dead. I've tested it.
			[add_junk /]
			float W2SP[3];
			if (WorldToScreenM(EnemyPlayer[i].Posi, W2SP)) 
			{
				[add_junk /]
				if (EnemyPlayer[i].TeamNum != SimplePlayer.TeamNum)
				{
					[add_junk /]
					int distance = Get3D(EnemyPlayer[0].Posi[0], EnemyPlayer[0].Posi[1], EnemyPlayer[0].Posi[2], EnemyPlayer[i].Posi[0], EnemyPlayer[i].Posi[1], EnemyPlayer[i].Posi[2]);
					int width1 = 18100 / distance;
					int height1 = 41000 / distance;
					[add_junk /]
					if (EnemyPlayer[i].Flags == 775)
					{
						width1 = 15950 / distance;
						height1 = 33000 / distance;
					}
					[add_junk /]
					int Health = EnemyPlayer[i].Health;
					int ArmorValue = EnemyPlayer[i].ArmorValueInt;
					[add_junk /]
					std::stringstream ss, hp, ap;
					ss << (int)distance / 3;
					hp << Health;
					ap << ArmorValue;
					[add_junk /]
					char * distanceInfo = new char[ss.str().size() + 1];
					strcpy(distanceInfo, ss.str().c_str());
					[add_junk /]
					char * HealthInfo = new char[hp.str().size() + 1];
					strcpy(HealthInfo, hp.str().c_str());
					[add_junk /]
					char * ArmorInfo = new char[ap.str().size() + 1];
					strcpy(ArmorInfo, ap.str().c_str());
					[add_junk /]
					DrawString("HP:", W2SP[0] + (width1 / 2) + 5, W2SP[1] - height1, BoxR, BoxG, BoxB, pFontSmall);
					DrawString(HealthInfo, W2SP[0] + (width1 / 2) + 30, W2SP[1] - height1, BoxR, BoxG, BoxB, pFontSmall);
					[add_junk /]
					DrawString("AP:", W2SP[0] + (width1 / 2) + 5, W2SP[1] - height1 + 20, BoxR, BoxG, BoxB, pFontSmall);
					DrawString(ArmorInfo, W2SP[0] + (width1 / 2) + 30, W2SP[1] - height1 + 20, BoxR, BoxG, BoxB, pFontSmall);
					[add_junk /]
					DrawString("Dist:", W2SP[0] + (width1 / 2) + 5, W2SP[1] - height1 + 40, BoxR, BoxG, BoxB, pFontSmall);
					DrawString(distanceInfo, W2SP[0] + (width1 / 2) + 35, W2SP[1] - height1 + 40, BoxR, BoxG, BoxB, pFontSmall);
					[add_junk /]
					int playerhealthheight = ((Health * height1) / 100);
					int playerhealthwidth = ((Health * width1) / 100);
					[add_junk /]
					DrawHealthBarHorizontal(W2SP[0] - (width1 / 2), W2SP[1] + 5, width1, 3, playerhealthwidth, BoxR, BoxG, BoxB);
					[add_junk /]
					CornerBox(W2SP[0] - (width1 / 2), W2SP[1] - height1, width1, height1, BoxR, BoxG, BoxB, 255);
					
					[add_junk /]
					delete[] HealthInfo, distanceInfo;
				}
			}
			
		}
	}

}
That's alot of junk, haven't really looked at the entire code but i don't think you need that much junk.
Try reduces the amount of junk and see if anything changes.
Junk code has none to minimal effect on a cheat's detection... Just saying
Quote Originally Posted by d4rkW View Post
Junk code has none to minimal effect on a cheat's detection... Just saying
thats why i put it almost everywhere lmao
bump? ive been looking at this for 45 mins now and i cant figure it out
Quote Originally Posted by ImWhacky View Post
bump? ive been looking at this for 45 mins now and i cant figure it out
You're really bad at looking for it then. You want to make cheats, yet i don't see any valuable effort from your side.

Opening Visual Studios debugger is literally your fix. The debugger tells you exactly what exceptions are being thrown, where and why.
If you crash without any exception, step through your code until you get to the point where it's crashing and you have the exact line of code which is causing the problems.
Quote Originally Posted by WasserEsser View Post
You're really bad at looking for it then. You want to make cheats, yet i don't see any valuable effort from your side.

Opening Visual Studios debugger is literally your fix. The debugger tells you exactly what exceptions are being thrown, where and why.
If you crash without any exception, step through your code until you get to the point where it's crashing and you have the exact line of code which is causing the problems.
i cant do it in visual studio because its a pollyhack and it wont run with the [add_junk /] and that stuff, it works without it but not with it
Believe this has been solved.

/Closed.
Posts 18 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?