HelpESP Only drawing when looking certain directions

Posts 115 of 16 · Page 1 of 2
ESP Only drawing when looking certain directions
Hey guys, trying to get my esp to work.
A good way to explain it is like this
If im looking north or east, it will draw my esp perfectly fine
If im looking south or west, it won't draw my esp at all.





Called in PaintTraverse...
Quote Originally Posted by z346etn56jzd7egth View Post
In your DrawESP function your checking if WorldToScreen == false on an uninitialized vector, why is that? Looks pasted too, you use a mixture of hungarian notation, camelCase, MixedCase and some variables are just all in lower caps...
Yeah i took a look at another source and... got kinda lazy....

after taking a look at lua, its uninitialized because w2s initializes the variables and sets them o.O
Quote Originally Posted by z346etn56jzd7egth View Post
The world vector is still uninitialized and either way, that if statement is completely useless.

as for your issue, maybe try removing that LifeState check, I use Health to check if the player is alive so idk if that could be the cause or not.
Health has nothing to do on if its rendering considering its affected by where im aiming

See it draws if im looking this way..

Yet not if i look this way...

Code (rewrote function by looking at lua happens to be almost the same lol)
Code:
void CDrawManager::DrawPlayerBox(C_BasePlayer *pEnt, DWORD dwColor)
{
	if (pEnt == NULL)
		return;

	
	Vector vMon, vNom;

	vNom = pEnt->GetAbsOrigin();

	vMon = vNom + Vector(0, 0, 80.f);
	Vector vBot, vTop;
	if (WorldToScreen(vNom, vBot) && WorldToScreen(vMon, vTop))
	{
		int iH = (vBot.y - vTop.y);
		int iW = iH / 5.f;
		OutlineRect(vTop.x - iW, vTop.y, iW * 2, iH, dwColor);
	}
}
w2s
Code:
bool CDrawManager::WorldToScreen(Vector &vOrigin, Vector &vScreen)
{
	const VMatrix& worldToScreen = g_pEngine->WorldToScreenMatrix();
	float w = 0;
	w = w + worldToScreen[3][0] * vOrigin[0];
	w = w + worldToScreen[3][1] * vOrigin[1];
	w = w + worldToScreen[3][2] * vOrigin[2] + worldToScreen[3][3];
	vScreen.z = 0;
	if (w > 0.001)
	{
		float fl1DBw = 1 / w;
		vScreen.x = (gScreenWidth / 2) + (0.5 * ((worldToScreen[0][0] * vOrigin[0] + worldToScreen[0][1] * vOrigin[1] + worldToScreen[0][2] * vOrigin[2] + worldToScreen[0][3]) * fl1DBw) * gScreenWidth + 0.5);
		vScreen.y = (gScreenHeight / 2) - (0.5 * ((worldToScreen[1][0] * vOrigin[0] + worldToScreen[1][1] * vOrigin[1] + worldToScreen[1][2] * vOrigin[2] + worldToScreen[1][3]) * fl1DBw) * gScreenHeight + 0.5);
		return true;
	}
	return false;
}
nvm i removed that fucking pointless check on 2 uninitialized variables and it works now... i didn't pay attention to that part of my code hahaha
Quote Originally Posted by blackstab1337 View Post
Health has nothing to do on if its rendering considering its affected by where im aiming

See it draws if im looking this way..

Yet not if i look this way...

Code (rewrote function by looking at lua happens to be almost the same lol)
Code:
void CDrawManager::DrawPlayerBox(C_BasePlayer *pEnt, DWORD dwColor)
{
	if (pEnt == NULL)
		return;

	
	Vector vMon, vNom;

	vNom = pEnt->GetAbsOrigin();

	vMon = vNom + Vector(0, 0, 80.f);
	Vector vBot, vTop;
	if (WorldToScreen(vNom, vBot) && WorldToScreen(vMon, vTop))
	{
		int iH = (vBot.y - vTop.y);
		int iW = iH / 5.f;
		OutlineRect(vTop.x - iW, vTop.y, iW * 2, iH, dwColor);
	}
}
w2s
Code:
bool CDrawManager::WorldToScreen(Vector &vOrigin, Vector &vScreen)
{
	const VMatrix& worldToScreen = g_pEngine->WorldToScreenMatrix();
	float w = 0;
	w = w + worldToScreen[3][0] * vOrigin[0];
	w = w + worldToScreen[3][1] * vOrigin[1];
	w = w + worldToScreen[3][2] * vOrigin[2] + worldToScreen[3][3];
	vScreen.z = 0;
	if (w > 0.001)
	{
		float fl1DBw = 1 / w;
		vScreen.x = (gScreenWidth / 2) + (0.5 * ((worldToScreen[0][0] * vOrigin[0] + worldToScreen[0][1] * vOrigin[1] + worldToScreen[0][2] * vOrigin[2] + worldToScreen[0][3]) * fl1DBw) * gScreenWidth + 0.5);
		vScreen.y = (gScreenHeight / 2) - (0.5 * ((worldToScreen[1][0] * vOrigin[0] + worldToScreen[1][1] * vOrigin[1] + worldToScreen[1][2] * vOrigin[2] + worldToScreen[1][3]) * fl1DBw) * gScreenHeight + 0.5);
		return true;
	}
	return false;
}
I read it wrong woops!
nvm not solved lol
Quote Originally Posted by z346etn56jzd7egth View Post
what was the issue?
Edited my post above, had that pointless check of 2 non initialized variables, removed that and it started working

- - - Updated - - -

Not fixed!
It's only drawing on SOME players, not all.

lmk if you need updated code, nothing much has changed lol
Quote Originally Posted by TeslaEngineerCoder View Post
Stop pasting from horizon
im not
Quote Originally Posted by TeslaEngineerCoder View Post
Do you know who I am kid? I just leaked horizon I didn't make it.
nobody cares
Quote Originally Posted by blackstab1337 View Post
im not

nobody cares
Actually you are but it's okay watch out guys skid in denial.
Quote Originally Posted by TeslaEngineerCoder View Post
Actually you are but it's okay watch out guys skid in denial.
I don't even have horizon source gg
Quote Originally Posted by TeslaEngineerCoder View Post
Actually you are but it's okay watch out guys skid in denial.
it's either pasted from darkstorm, yabe (which is pasted from darkstorm) or the csgo base by sfab

don't remember which one but i have seen that function and this code before
Quote Originally Posted by D3M0L1T10N View Post
it's either pasted from darkstorm, yabe (which is pasted from darkstorm) or the csgo base by sfab

don't remember which one but i have seen that function and this code before
its from yabe
I've rewritten the function and other stuff, working perfectly now.
Quote Originally Posted by blackstab1337 View Post
its from yabe
I've repasted the function and other stuff, working perfectly now.
Check before you paste kids.
Quote Originally Posted by z346etn56jzd7egth View Post
Stop pasting from HAC booty
Do you know who I am kid? I just leaked horizon I didn't make it.
I can see some Earthshaker Tool code in there. Could you please give me credits for using my code? Thank you.
Posts 115 of 16 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?