Thread: learn aimbot

Results 1 to 7 of 7
  1. #1
    antierror's Avatar
    Join Date
    Jan 2018
    Gender
    male
    Posts
    42
    Reputation
    10
    Thanks
    0
    My Mood
    Amazed

    Unhappy learn aimbot


    i need learn how to make only aimbot and update

  2. #2
    TheGe2k's Avatar
    Join Date
    Mar 2020
    Gender
    male
    Posts
    38
    Reputation
    10
    Thanks
    27
    My Mood
    Asleep
    You must do anything Except C++.

  3. #3
    antierror's Avatar
    Join Date
    Jan 2018
    Gender
    male
    Posts
    42
    Reputation
    10
    Thanks
    0
    My Mood
    Amazed
    Quote Originally Posted by TheGe2k View Post
    You must do anything Except C++.
    I really work and also learn for fun

  4. #4
    Anger5K's Avatar
    Join Date
    May 2020
    Gender
    male
    Posts
    74
    Reputation
    10
    Thanks
    28
    My Mood
    Lurking
    Quote Originally Posted by antierror View Post

    i need learn how to make only aimbot and update
    Code:
    void Aimbot(LPDIRECT3DDEVICE9 pDevice)
     {
    	DWORD inGame = (DWORD)GetModuleHandle("Object.dll");
    	if (!IsGameReadyForHookPoint() || !inGame) return;
    
    	DWORD CShell = (DWORD)GetModuleHandleA(eCShell);
    	
    	DWORD crossfire = (DWORD)GetModuleHandleA(eCF);
    	if (crossfire == NULL) return;
    
    	int VisibleCheck = hMenuItem[19];
    	int AimBone = hMenuItem[18];
    	int AimKey = hMenuItem[17];
    	int AimMode = hMenuItem[20];
    	
    	POINT pt;
    	D3DVIEWPORT9 viewP;
    	pDevice->GetViewport(&viewP);
    	float ScreenX = viewP.Width / 2;
    	float ScreenY = viewP.Height / 2;
    	pt.x = ScreenX;
    	pt.y = ScreenY;
    
    	if (IsGameReadyForHookPoint() && inGame)
    	{
    		DWORD pLTClientShell = *(DWORD*)(CShell + aLTClientShell);
    		if (pLTClientShell != NULL)
    		{
    			CPlayer* Me = GetPlayerByIndex(pLTClientShell, GetMyIndex(pLTClientShell));
    			if (isValidClient(Me))
    			{
    				if (Me->Health > 0 && AimKey > 0)
    				{
    					{
    						int TargetIndex, BONE_ID;
    
    						switch (AimBone)
    						{
    						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
    						}
    
    						int iAimAt = -1;
    						float MaxDistance = 0xFFFFFFF;
    
    						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(Me, pPlayer)) continue;
    
    							if (WorldToScreen(pDevice, &pos))
    							{
    
    								float radiusx = (15 * 5.0f) * (ScreenX / 100.0f);
    								float radiusy = (15 * 5.0f) * (ScreenY / 100.0f);
    
    								float Tmp = NULL;
    
    								if (AimMode == 1) { // Get player distance from crosshair
    									Tmp = GetDistance2(pos.x, pos.y, ScreenX, ScreenY);
    								}
    								else if (AimMode == 0) { // Get player distance from player
    									Tmp = GetDistance2(pos.x, pos.y, ScreenX, ScreenY);
    								}
    
    								//if in fov
    								if (pos.x >= ScreenX - radiusx && pos.x <= ScreenX + radiusx && pos.y >= ScreenY - radiusy && pos.y <= ScreenY + radiusy)
    								{
    									if (Tmp < MaxDistance)
    									{
    										MaxDistance = Tmp;
    										iAimAt = i;
    									}
    								}
    							}
    						}
    
    						if (iAimAt == -1)
    							return;
    
    						if (iAimAt > -1)
    						{
    							CPlayer* Target = GetPlayerByIndex(pLTClientShell, iAimAt);
    							if (isValidClient(Target))
    							{
    								if (Target && Target->Object && Target->Health > 0 && Target != Me)
    								{
    									D3DXVECTOR3 AimPos = GetBonePosition(Target->Object, BONE_ID);
    									if (WorldToScreen(pDevice, &AimPos))
    									{
    										float DistX = AimPos.x - ScreenX;
    										float DistY = AimPos.y - ScreenY;
    
    											if (VisibleCheck == 0)
    											{
    
    												{
    													switch (AimKey)
    													{
    													case 1: mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL); break;
    													case 2: if (GetAsyncKeyState(VK_LBUTTON)) mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL); break;
    													case 3: if (GetAsyncKeyState(VK_RBUTTON)) mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL); break;
    													case 4: if (GetAsyncKeyState(VK_SHIFT)) mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);	break;
    													case 5: if (GetAsyncKeyState(VK_MENU)) mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL); break;
    											
    													}
    												}
    											}
    
    											if (VisibleCheck == 1)
    											{
    												if (IsVisible(GetBonePosition(Me->Object, 6), GetBonePosition(Target->Object, BONE_ID)))
    												{
    													switch (AimKey)
    													{
    													case 1: mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL); break;
    													case 2: if (GetAsyncKeyState(VK_LBUTTON)) mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL); break;
    													case 3: if (GetAsyncKeyState(VK_RBUTTON)) mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL); break;
    													case 4: if (GetAsyncKeyState(VK_SHIFT)) mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL);	break;
    													case 5: if (GetAsyncKeyState(VK_MENU)) mouse_event(MOUSEEVENTF_MOVE, (float)DistX, (float)DistY, 0, NULL); break;
    		
    													}
    
    												}
    											}
    										}
    
    
    									}
    								}
    							}
    						}
    					}
    				}
    			}
    		}
    	}
    Engine:
    Code:
    bool IsGameReadyForHookPoint()
    {
    	if (GetModuleHandleA("CShell.dll") != NULL && GetModuleHandleA("ClientFx.fxd") != NULL && GetModuleHandleA("crossfire.exe") != NULL && GetModuleHandleA("d3d9.dll") != NULL && GetModuleHandleA("SndDrv.dll") != NULL)
    		return true;
    	return false;
    }
    
    bool isValidClient(CPlayer* Clients)
    {
    	if ((Clients != NULL) && (Clients->Health > 0) && (strlen(Clients->Name) > 2) && (Clients->Object != NULL))
    		return true;
    	return false;
    }
    
    D3DXVECTOR3 GetMidPoint(D3DXVECTOR3 V1, D3DXVECTOR3 V2)
    {
    	return D3DXVECTOR3((V1.x + V2.x) / 2, (V1.y + V2.y) / 2, (V1.z + V2.z) / 2);
    }
    
    char GetMyIndex(DWORD pLTCLientShell)
    {
    	if (pLTCLientShell)
    	{
    		BYTE clients = *(BYTE*)(pLTCLientShell + dwCPlayerStart);
    		if (clients < 16)
    			return *(char*)(pLTCLientShell + clients * dwCPlayerSize + MEOffset);
    	}
    	return -1;
    }
    
    bool inGame()
    {
    
    	DWORD CShell = (DWORD)GetModuleHandleA(eCShell);
    	DWORD pLTClientShell = *(DWORD*)(CShell + aLTClientShell);
    	CPlayer* player = GetPlayerByIndex(pLTClientShell, GetMyIndex(pLTClientShell));
    	if ((player != NULL) && (strlen(player->Name) > 2) && (player->Object != NULL))
    		return true;
    	return false;
    }
    
    bool IsTM(CPlayer* Me, CPlayer* Target)
    {
    	if (Me->Team != Target->Team)
    		return false;
    	return true;
    }
    
    void GetBonePositionEx(cObject* obj, UINT Bone, _Transform* Trans)
    {
    	DWORD CShell = (DWORD)GetModuleHandleA(eCShell);
    	DWORD ClientFx = (DWORD)GetModuleHandleA("ClientFx.fxd");
    	if (!CShell && !ClientFx) return;
    	DWORD pLTModel = *(DWORD*)(CShell + aLTModel);
    
    	__asm
    	{
    		MOV ECX, pLTModel
    		MOV EDX, DWORD PTR DS : [ECX]
    		MOV EDX, DWORD PTR DS : [EDX + 0x3C]
    		PUSH 1
    		PUSH Trans
    		PUSH Bone
    		PUSH obj
    		CALL EDX
    	}
    }
    
    D3DXVECTOR3 GetBonePosition(cObject* obj, UINT Bone)
    {
    	_Transform Trans;
    	GetBonePositionEx(obj, Bone, &Trans);
    	return (Trans.Pos);
    }
    
    
    void GetNodePosition(cObject* obj, UINT Bone, D3DXVECTOR3& Out)
    {
    	_Transform Trans;
    	GetBonePositionEx(obj, Bone, &Trans);
    	Out = Trans.Pos;
    	Out.y += 5;
    }
    
    float GetDistance(float Xx, float Yy, float xX, float yY)
    {
    	return sqrt((yY - Yy) * (yY - Yy) + (xX - Xx) * (xX - Xx));
    }
    
    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));
    }
    float CalculateDistance2(LTVector from, LTVector 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));
    }
    
    bool WorldToScreen(LPDIRECT3DDEVICE9 pDevice, D3DXVECTOR3* InOut)
    {
    	D3DXVECTOR3 vScreen;
    	D3DXVECTOR3 PlayerPos(InOut->x, InOut->y, InOut->z);
    	D3DVIEWPORT9 viewPort = { 0 };
    	D3DXMATRIX projection, view, world;
    	pDevice->GetTransform(D3DTS_VIEW, &view);
    	pDevice->GetTransform(D3DTS_PROJECTION, &projection);
    	pDevice->GetTransform(D3DTS_WORLD, &world);
    	pDevice->GetViewport(&viewPort);
    	D3DXVec3Project(&vScreen, &PlayerPos, &viewPort, &projection, &view, &world);
    	if (vScreen.z < 1.0f && vScreen.x > 0.0f && vScreen.y > 0.0f && vScreen.x < viewPort.Width && vScreen.y < viewPort.Height)
    	{
    		*InOut = vScreen;
    		return true;
    	}
    	return false;
    }
    Class
    Code:
    struct cObject
    {
    public:
    	char _UnkSpace[4];
    	D3DXVECTOR3 Body;
    	D3DXVECTOR3 Foot;
    	D3DXVECTOR3 Head;
    
    };
    class CPlayer
    {
    public:
    char _0x0000[4];
    	cObject* Object; //0x0004
    	__int8 ClientID; //0x0008
    	__int8 Team; //0x0009
    	char _Name[12]; //0x000A
    		char _0x0016[2];
    		cCharacterFX* cCharacterFX; //0x0018
    	__int32 PlayerSlotTeam; //0x001c
    	char _0x0020[4];
    	bool HasC4; //0x0024
    	char _0x0025[7];
    	_int32 Rank; //0x002c
    	char _0x0030[16];
    	__int8 Health; //0x0040
    	__int8 kills; //0x0041
    		__int32 Deaths; //0x0042
    	char _0x0046[58];
    };
    struct IntersectQuery
    {
    	D3DXVECTOR3 From;					//0x0000
    	D3DXVECTOR3 To;						//0x000C
    	char _UnkSpace[12];						//SPACE
    	unsigned int Flags;					//0x0024
    	ObjectFilterFn FilterFn;			//0x0028
    	void* FilterIntersectParam;			//0x002C
    	ObjectFilterFn FilterIntersectFn;	//0x0030
    	void* FilterParam;					//0x0034
    	void* PolyFilterParam;				//0x0038
    };
    about Address and offset i already Every new update I post new addresses
    https://www.mpgh.net/forum/showthread.php?t=1523835
    and you still lerning c++ for working all that

  5. The Following User Says Thank You to Anger5K For This Useful Post:

    XahmedX209 (4 Days Ago)

  6. #5
    Biesi's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    4,987
    Reputation
    353
    Thanks
    8,766
    My Mood
    Twisted
    Quote Originally Posted by Anger5K View Post
    Code:
    													}
    
    												}
    											}
    										}
    
    
    									}
    								}
    							}
    						}
    					}
    				}
    			}
    		}
    	}
    My eyes bleed

  7. #6
    Anger5K's Avatar
    Join Date
    May 2020
    Gender
    male
    Posts
    74
    Reputation
    10
    Thanks
    28
    My Mood
    Lurking
    lol me too

  8. #7
    XahmedX209's Avatar
    Join Date
    May 2020
    Gender
    male
    Posts
    19
    Reputation
    10
    Thanks
    0
    Not Worked for me

Similar Threads

  1. [Help] I want to learn how to make a csgo cheat with legit aimbot.
    By officiaimanish in forum C# Programming
    Replies: 6
    Last Post: 03-31-2020, 07:48 AM
  2. [Source Code] Aimbot+ESP+More BF4 2014 Newest update! Source Code! Hope you will learn from this :)
    By ZusCoo in forum Battlefield 4 Hacks & Cheats
    Replies: 10
    Last Post: 02-24-2014, 04:57 PM
  3. Replies: 2
    Last Post: 02-20-2014, 11:29 AM
  4. I want to learn how to make a aimbot.
    By lilchat24 in forum Combat Arms Coding Help & Discussion
    Replies: 27
    Last Post: 12-07-2010, 12:13 PM
  5. America's Army aimbot
    By garebear in forum General Game Hacking
    Replies: 6
    Last Post: 12-30-2005, 05:52 PM