HelpHelp me with aimbot please .

Posts 1–11 of 11 · Page 1 of 1
Help me with aimbot please .
Could anyone help me with my aimbot?
I am using -flux source but I have tried updating the source but it doesn't work at all.

Only the Visible Check is working.


I am planning on using MousEvent But I don't have any Idia how to implement it.
Could you help me guys?

@CaiozinhoFC1 @RamoXO @dreek1 @


Struct used:
Code:
class CPlayerPos
{
public:
	char Spacer[0xDC];
	D3DXVECTOR3 Pos;
};


class CLTPlayerClient
{
public:
	char Spacer[0x4bC]; 
		CPlayerPos* pPlayerPos;
	char Spacer2[8];
	float Pitch; //4C8
	float Yaw; //4D0
};
GetNearestByCrossHair Function& SetMouseCursor
Code:
void SetMouseCursor(LPDIRECT3DDEVICE9 pDevice, CPlayer* Me, CPlayer* pPlayer, D3DXVECTOR3 pos)
{
	CLTPlayerClient* pClient = (CLTPlayerClient*)(*(DWORD*)(dw_pCLTPlayerClient + CLTPlayerClientOffset));
	if (pPlayer && pPlayer->Object && pPlayer->Health > 0 && pPlayer != Me)
	{
		D3DXMATRIX View, iView;
		D3DXVECTOR3 fDist;
		pDevice->GetTransform(D3DTS_VIEW, &View);
		D3DXMatrixInverse(&iView, 0, &View);
		D3DXVec3Subtract(&fDist, &pos, &D3DXVECTOR3(iView._41, iView._42, iView._43));
		pClient->Pitch = (float)atan2(-fDist.y, sqrt(fDist.x * fDist.x + fDist.z * fDist.z));
		pClient->Yaw = (float)atan2(fDist.x, fDist.z);
	}
}

int GetNearestByCrossHair(LPDIRECT3DDEVICE9 pDevice)
{
	int iAimAt = -1;
	float MaxDistance = 0xFFFFFFF;

	D3DVIEWPORT9 viewP;
	pDevice->GetViewport(&viewP);
	float ScreenX = viewP.Width / 2;
	float ScreenY = viewP.Height / 2;
	float PosX = 0.0f, PosY = 0.0f;

	DWORD pLTClientShell = *(DWORD*)dw_pLTClientShell;
	CPlayer* Me = GetPlayerByIndex(pLTClientShell, GetMyIndex(pLTClientShell));

	for (int i = 0; i<16; i++)
	{
		CPlayer* pPlayer = GetPlayerByIndex(pLTClientShell, i);
		D3DXVECTOR3 pos = GetBonePosition(pPlayer->Object, 6);

		if (!IsValidClient(pPlayer) && Me != pPlayer) continue;
		if (IsTM(pLTClientShell, pPlayer)) continue;

		if (Trans3DTo2D(pDevice, &pos))
		{
			PosX = pos.x > ScreenX ? pos.x - ScreenX : ScreenX - pos.x;
			PosY = pos.y > ScreenY ? pos.y - ScreenY : ScreenY - pos.y;

			float Tmp = sqrt(PosX*PosX + PosY*PosY);

			if (Tmp < MaxDistance)
			{
				MaxDistance = Tmp;
				iAimAt = i;
			}
		}
	}
	return iAimAt;
}
Aimbot source:
Code:
void PlayerAimbot(LPDIRECT3DDEVICE9 pDevice)
{
	if (!GetModuleHandle("CShell.dll")) return;
	if (!GetModuleHandle("ClientFX.fxd")) return;

	DWORD pLTClientShell = *(DWORD*)dw_pLTClientShell;
	DWORD pCLTPlayerClient = *(DWORD*)(dw_pCLTPlayerClient + CLTPlayerClientOffset);
	CPlayer* Me = GetPlayerByIndex(pLTClientShell, GetMyIndex(pLTClientShell));

	int i;
	int BONE_ID;

	switch (Item20)//Aimbot /Bone position
	{
	case 1: BONE_ID = 6; break;//Head
	case 2: BONE_ID = 5; break;//Neck
	case 3: BONE_ID = 2; break;//Body
	case 4: BONE_ID = 10; break;//LeftHand
	case 5: BONE_ID = 17; break;//RightHand
	case 6: BONE_ID = 23; break;//FeftFoot
	case 7: BONE_ID = 28; break;//RightFoor
	default: BONE_ID = 6;//HEAD
	}

	if (pCLTPlayerClient != 0)
	{
		i = GetNearestByCrossHair(pDevice);

		CPlayer* Target = GetPlayerByIndex(pLTClientShell, i);
		D3DXVECTOR3 AimPos = GetBonePosition(Target->Object, BONE_ID);

		/*if (Trigger)
		{
			for (int i = 0; i<0x1FF; ++i)
			{
				if (*(float*)(pCLTPlayerClient + 4 * i) == 140)
				{
					if (*(float*)(pCLTPlayerClient + ((4 * i) + 0x3C)) > 0)
						TriggerBot(pDevice, GetBonePosition(Target->Object, 2), Me, Target);
					else
						*(float*)(pCLTPlayerClient + ((4 * i) + 0x150)) = 6;
				}
			}
		}*/

		if (Item22) //Visible check
		{
			if (IsVisible(GetBonePosition(Me->Object, BONE_ID), GetBonePosition(Target->Object, BONE_ID)))
			{
				if (Item19 == 1) //AimKey for aimbot
					SetMouseCursor(pDevice, Me, Target, AimPos);
				if (Item19 == 2)
					if (GetAsyncKeyState(VK_LBUTTON))
						SetMouseCursor(pDevice, Me, Target, AimPos);
				if (Item19 == 3)
					if (GetAsyncKeyState(VK_RBUTTON))
						SetMouseCursor(pDevice, Me, Target, AimPos);
				if (Item19 == 4)
					if (GetAsyncKeyState(VK_SHIFT))
						SetMouseCursor(pDevice, Me, Target, AimPos);
				if (Item19 == 5)
					if (GetAsyncKeyState(VK_MENU))
						SetMouseCursor(pDevice, Me, Target, AimPos);
			}
		}
		else
		{
			if (Item19 == 1)
				SetMouseCursor(pDevice, Me, Target, AimPos);
			if (Item19 == 2)
				if (GetAsyncKeyState(VK_LBUTTON))
					SetMouseCursor(pDevice, Me, Target, AimPos);
			if (Item19 == 3)
				if (GetAsyncKeyState(VK_RBUTTON))
					SetMouseCursor(pDevice, Me, Target, AimPos);
			if (Item19 == 4)
				if (GetAsyncKeyState(VK_SHIFT))
					SetMouseCursor(pDevice, Me, Target, AimPos);
			if (Item19 == 5)
				if (GetAsyncKeyState(VK_MENU))
					SetMouseCursor(pDevice, Me, Target, AimPos);
		}
	}
}
2012 CODE
Code:
#define NEAREST_BY_DISTANCE 0
#define NEAREST_BY_CROSSHAIR 1
VOID SetMouseCursor(LPDIRECT3DDEVICE9 pDevice, DWORD pClient, D3DXVECTOR3 Position)
{
	D3DXMATRIX View, iView;
	D3DXVECTOR3 Distance;

	pDevice->GetTransform(D3DTS_VIEW, &View);

	D3DXMatrixInverse(&iView, NULL, &View);
	D3DXVec3Subtract(&Distance, &Position, &D3DXVECTOR3(iView._41, iView._42, iView._43));


	*(FLOAT *)(pClient + OFFSET_YAW) = (FLOAT)atan2(-Distance.y, sqrt(Distance.x * Distance.x + Distance.z * Distance.z));
	*(FLOAT *)(pClient + OFFSET_PITCH) = (FLOAT)atan2(Distance.x, Distance.z);
}
float CalculateDistance(D3DXVECTOR3 from, D3DXVECTOR3 to)
{
	return sqrt((to.x - from.x) * (to.x - from.x) + (to.y - from.y) * (to.y - from.y) + (to.z - from.z) * (to.z - from.z));
}

int GetNearestPlayer(LPDIRECT3DDEVICE9 pDevice)
{
	DWORD CShell = (DWORD)GetModuleHandleA(eCShell);
	if (CShell != NULL)
	{
		DWORD pLTClientShell = *(DWORD*)(CShell + ADDR_LTCLIENTSHELL);
		if (pLTClientShell != NULL)
		{
			// Get screen viewport
			D3DVIEWPORT9 viewP;
			pDevice->GetViewport(&viewP);
			float ScreenX = viewP.Width / 2;
			float ScreenY = viewP.Height / 2;
			float MaxDistance = 0xFFFFFFF;
			float PosX = 0.0f, PosY = 0.0f;
			int AimTarget = -1;
			// Get current player
			cPlayer* Me = GetPlayerByIndex(pLTClientShell, GetMyIndex(pLTClientShell));
			for (int i = 0; i < 16; i++)
			{
				cPlayer* pPlayer = GetPlayerByIndex(pLTClientShell, i);

				// Validate client's 
				if (!IsValidClient(pPlayer) || Me == pPlayer || IsTM(pLTClientShell, pPlayer)) continue;

				D3DXVECTOR3 HeadPosition = GetBonePosition(pPlayer->Object, 6);
				D3DXVECTOR3 Foot = GetBonePosition(pPlayer->Object, 23);
				// Validate client's
				if (!MundoParaTela(pDevice, &HeadPosition) && MundoParaTela(pDevice, &Foot)) continue;

				if (AimbotMode == NEAREST_BY_CROSSHAIR)
				{

					D3DXVECTOR3 Screen((FLOAT)(viewP.Width / 2), (FLOAT)(viewP.Height / 2), 0.0f);
					D3DXVECTOR3 Pos = (HeadPosition - Screen);

					DOUBLE Dist = ((Pos.x * Pos.x) + (Pos.y * Pos.y) + (Pos.z * Pos.z));

					if (Dist < MaxDistance)
					{
						MaxDistance = Dist;
						AimTarget = i;
					}
				}
				else if (AimbotMode == NEAREST_BY_DISTANCE)
				{
					D3DXVECTOR3 mePos = GetBonePosition(Me->Object, 6);

					// Check if the target player is avaliable
					if (MundoParaTela(pDevice, &mePos))
						if (VisibleCheckAimbot && !IsVisible(mePos, HeadPosition))
							continue;

					// Get player distance from crosshair
					float Distance = CalculateDistance(Me->Object->Body, pPlayer->Object->Body) / 100;
					if (Distance < MaxDistance)
					{
						MaxDistance = Distance;
						AimTarget = i;
					}
				}
				else
					return -1;
			}
			return AimTarget;
		}
	}
}

if (GetAsyncKeyState(VK_LBUTTON))
SetMouseCursor(pDevice, *(DWORD *)(pLTClientShell + 0x70), AimPos);
Quote Originally Posted by dreek1 View Post
2012 CODE
Code:
#define NEAREST_BY_DISTANCE 0
#define NEAREST_BY_CROSSHAIR 1
VOID SetMouseCursor(LPDIRECT3DDEVICE9 pDevice, DWORD pClient, D3DXVECTOR3 Position)
{
	D3DXMATRIX View, iView;
	D3DXVECTOR3 Distance;

	pDevice->GetTransform(D3DTS_VIEW, &View);

	D3DXMatrixInverse(&iView, NULL, &View);
	D3DXVec3Subtract(&Distance, &Position, &D3DXVECTOR3(iView._41, iView._42, iView._43));


	*(FLOAT *)(pClient + OFFSET_YAW) = (FLOAT)atan2(-Distance.y, sqrt(Distance.x * Distance.x + Distance.z * Distance.z));
	*(FLOAT *)(pClient + OFFSET_PITCH) = (FLOAT)atan2(Distance.x, Distance.z);
}
float CalculateDistance(D3DXVECTOR3 from, D3DXVECTOR3 to)
{
	return sqrt((to.x - from.x) * (to.x - from.x) + (to.y - from.y) * (to.y - from.y) + (to.z - from.z) * (to.z - from.z));
}

int GetNearestPlayer(LPDIRECT3DDEVICE9 pDevice)
{
	DWORD CShell = (DWORD)GetModuleHandleA(eCShell);
	if (CShell != NULL)
	{
		DWORD pLTClientShell = *(DWORD*)(CShell + ADDR_LTCLIENTSHELL);
		if (pLTClientShell != NULL)
		{
			// Get screen viewport
			D3DVIEWPORT9 viewP;
			pDevice->GetViewport(&viewP);
			float ScreenX = viewP.Width / 2;
			float ScreenY = viewP.Height / 2;
			float MaxDistance = 0xFFFFFFF;
			float PosX = 0.0f, PosY = 0.0f;
			int AimTarget = -1;
			// Get current player
			cPlayer* Me = GetPlayerByIndex(pLTClientShell, GetMyIndex(pLTClientShell));
			for (int i = 0; i < 16; i++)
			{
				cPlayer* pPlayer = GetPlayerByIndex(pLTClientShell, i);

				// Validate client's 
				if (!IsValidClient(pPlayer) || Me == pPlayer || IsTM(pLTClientShell, pPlayer)) continue;

				D3DXVECTOR3 HeadPosition = GetBonePosition(pPlayer->Object, 6);
				D3DXVECTOR3 Foot = GetBonePosition(pPlayer->Object, 23);
				// Validate client's
				if (!MundoParaTela(pDevice, &HeadPosition) && MundoParaTela(pDevice, &Foot)) continue;

				if (AimbotMode == NEAREST_BY_CROSSHAIR)
				{

					D3DXVECTOR3 Screen((FLOAT)(viewP.Width / 2), (FLOAT)(viewP.Height / 2), 0.0f);
					D3DXVECTOR3 Pos = (HeadPosition - Screen);

					DOUBLE Dist = ((Pos.x * Pos.x) + (Pos.y * Pos.y) + (Pos.z * Pos.z));

					if (Dist < MaxDistance)
					{
						MaxDistance = Dist;
						AimTarget = i;
					}
				}
				else if (AimbotMode == NEAREST_BY_DISTANCE)
				{
					D3DXVECTOR3 mePos = GetBonePosition(Me->Object, 6);

					// Check if the target player is avaliable
					if (MundoParaTela(pDevice, &mePos))
						if (VisibleCheckAimbot && !IsVisible(mePos, HeadPosition))
							continue;

					// Get player distance from crosshair
					float Distance = CalculateDistance(Me->Object->Body, pPlayer->Object->Body) / 100;
					if (Distance < MaxDistance)
					{
						MaxDistance = Distance;
						AimTarget = i;
					}
				}
				else
					return -1;
			}
			return AimTarget;
		}
	}
}

if (GetAsyncKeyState(VK_LBUTTON))
SetMouseCursor(pDevice, *(DWORD *)(pLTClientShell + 0x70), AimPos);
Thank you for this @dreek1 , But their is an error 30_0 if you constanlt kill.
Quote Originally Posted by malfac009 View Post
Thank you for this @dreek1 , But their is an error 30_0 if you constanlt kill.
30_0 its 360 of player, just set 180 degrees will be work
Quote Originally Posted by dreek1 View Post
30_0 its 360 of player, just set 180 degrees will be work
Thankyou so much Your such a great man.
Quote Originally Posted by dreek1 View Post
SetMouseCursor(pDevice, Me, Target, AimPos);
I am trying it like this:
Code:
*(FLOAT *)(pClient + Offset_Yaw) = (FLOAT)(-1 * (atan2((Distance.y) , sqrt(Distance.x * Distance.x + Distance.z * Distance.z)) * 180 / 3.14159265f));
	*(FLOAT *)(pClient + Offset_Pitch) = (FLOAT)atan2(Distance.x, Distance.z);//Offset_Pitch
But it just calculate directly from my player angle (180 degree).
Quote Originally Posted by malfac009 View Post
I am trying it like this:
Code:
*(FLOAT *)(pClient + Offset_Yaw) = (FLOAT)(-1 * (atan2((Distance.y) , sqrt(Distance.x * Distance.x + Distance.z * Distance.z)) * 180 / 3.14159265f));
	*(FLOAT *)(pClient + Offset_Pitch) = (FLOAT)atan2(Distance.x, Distance.z);//Offset_Pitch
But it just calculate directly from my player angle (180 degree).
Now try to add FOV here
Code:
				if (AimbotMode == NEAREST_BY_CROSSHAIR)
				{

					D3DXVECTOR3 Screen((FLOAT)(viewP.Width / 2), (FLOAT)(viewP.Height / 2), 0.0f);
					D3DXVECTOR3 Pos = (HeadPosition - Screen);

					DOUBLE Dist = ((Pos.x * Pos.x) + (Pos.y * Pos.y) + (Pos.z * Pos.z));

					if (Dist < MaxDistance)
					{
						MaxDistance = Dist;
						AimTarget = i;
					}
				}
Could you PM me please, thanks :)
Quote Originally Posted by dreek1 View Post
Now try to add FOV here
Code:
				if (AimbotMode == NEAREST_BY_CROSSHAIR)
				{

					D3DXVECTOR3 Screen((FLOAT)(viewP.Width / 2), (FLOAT)(viewP.Height / 2), 0.0f);
					D3DXVECTOR3 Pos = (HeadPosition - Screen);

					DOUBLE Dist = ((Pos.x * Pos.x) + (Pos.y * Pos.y) + (Pos.z * Pos.z));

					if (Dist < MaxDistance)
					{
						MaxDistance = Dist;
						AimTarget = i;
					}
				}
Could you please pm me bro
@xtream injector Ican Help You
I'll try this. I will bring back with the result.
Thanks.
Where do you input these scripts?REZ files?also any apps that can be used for easier use?Im new on this whole coding thing and don't know much..sorry :/
Posts 1–11 of 11 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?