[c++] External aimbot

amoreamoreamore

Active member
Joined
May 3, 2019
Messages
38
Reaction score
10
Location
Saint-Petersburg
Hey UG-BASE, I'm trying to write an external aimbot, but in network there the sources are only from internal cheats. To write and change values, I used wpm every time it was possible. And... it doesn't work. Please help me.

P.S.
If anyone has sources from external cheats, please give them to me, it would help me a lot. Thanks!

C++:
        DWORD wID = 0xBAA410;
        ReadProcessMemory(hProcess, (LPCVOID)0xBAA410, &wID, sizeof(int), 0);
        ReadProcessMemory(hProcess, (LPCVOID)0xB6F5F0, &gpoint, 4, 0);



        if (gpoint > 0) {
            pmtrx1 = gpoint + 0x14;

            ReadProcessMemory(hProcess, (LPCVOID)pmtrx1, &pmtrx1, 4, 0);

            WriteProcessMemory(hProcess, (LPVOID)(gpoint + 0x14), &pmtrx1, 4, 0);

            xpos1 = pmtrx1 + 0x30;
            ypos1 = pmtrx1 + 0x34;
            zpos1 = pmtrx1 + 0x38;

            ReadProcessMemory(hProcess, (LPCVOID)xpos1, &fxpos1, 4, 0);
            ReadProcessMemory(hProcess, (LPCVOID)ypos1, &fypos1, 4, 0);
            ReadProcessMemory(hProcess, (LPCVOID)zpos1, &fzpos1, 4, 0);

            WriteProcessMemory(hProcess, (LPVOID)(pmtrx1 + 0x38), &fxpos1, 4, 0);
            WriteProcessMemory(hProcess, (LPVOID)(pmtrx1 + 0x34), &fypos1, 4, 0);
            WriteProcessMemory(hProcess, (LPVOID)(pmtrx1 + 0x38), &fzpos1, 4, 0);

            ReadProcessMemory(hProcess, (LPCVOID)0xB6F9CC, &fcxpos, 4, 0);
            ReadProcessMemory(hProcess, (LPCVOID)0xB6F9D0, &fcypos, 4, 0);

            ReadProcessMemory(hProcess, (LPCVOID)0xB6F5F0, &ptarget, 4, 0);

            pped = ptarget + 0x79C;
            ReadProcessMemory(hProcess, (LPCVOID)pped, &pped, 4, 0);
            WriteProcessMemory(hProcess, (LPVOID)(ptarget + 0x79C), &pped, 4, 0);

            if (pped > 0)
            {
                pvectorx = pped + 0x44; // border (x) (hitbox)
                pvectory = pped + 0x48; // border (y) (hitbox)

                ReadProcessMemory(hProcess, (LPCVOID)pvectorx, &fpvectorx, 4, 0);
                ReadProcessMemory(hProcess, (LPCVOID)pvectory, &fpvectory, 4, 0);

                WriteProcessMemory(hProcess, (LPVOID)(pped + 0x44), &fpvectorx, 4, 0);
                WriteProcessMemory(hProcess, (LPVOID)(pped + 0x48), &fpvectory, 4, 0);

                pmtrx2 = pped + 0x14; // pointer to XYZ of target
                ReadProcessMemory(hProcess, (LPCVOID)pmtrx2, &pmtrx2, 4, 0);
                WriteProcessMemory(hProcess, (LPVOID)(pped + 0x14), &pmtrx2, 4, 0);

                xpos2 = pmtrx2 + 0x30; // x position (of target)
                ypos2 = pmtrx2 + 0x34; // y position (of target)
                zpos2 = pmtrx2 + 0x38; // z position (of target)

                ReadProcessMemory(hProcess, (LPCVOID)xpos2, &fxpos2, 4, 0);
                ReadProcessMemory(hProcess, (LPCVOID)ypos2, &fypos2, 4, 0);
                ReadProcessMemory(hProcess, (LPCVOID)zpos2, &fzpos2, 4, 0);

                WriteProcessMemory(hProcess, (LPVOID)(pmtrx2 + 0x30), &xpos2, 4, 0);
                WriteProcessMemory(hProcess, (LPVOID)(pmtrx2 + 0x34), &ypos2, 4, 0);
                WriteProcessMemory(hProcess, (LPVOID)(pmtrx2 + 0x38), &zpos2, 4, 0);

                php = pped + 0x540;
                ReadProcessMemory(hProcess, (LPCVOID)php, &fphp, 4, 0);
                WriteProcessMemory(hProcess, (LPVOID)(pped + 0x540), &php, 4, 0);

                float theta, dist;
                if (fphp > 0) // if ped health > 0
                {


                    dist = sqrt((fxpos2 - fxpos1) * (fxpos2 - fxpos1) + (fypos2 - fypos1) * (fypos2 - fypos1) + (fzpos2 - fzpos1) * (fzpos2 - fzpos1));
                    theta = asin((fzpos2 - fzpos1) / dist);
                    theta -= (90 / (3.14 * 180));

                    fxpos2a = fxpos2;
                    fypos2a = fypos2;

                    aa = fabs(fcxpos - fxpos2);
                    ab = fabs(fcypos - fypos2);
                    ac = sqrt(aa * aa + ab * ab);

                    alpha = asin(aa / ac);
                    beta = acos(aa / ac);

                    if ((fxpos1 > fxpos2) && (fypos1 < fypos2))
                    {
                        beta = -beta;
                    }
                    if ((fxpos1 > fxpos2) && (fypos1 > fypos2))
                    {
                        beta = beta;
                    }
                    if ((fxpos1 < fxpos2) && (fypos1 > fypos2))
                    {
                        beta = (alpha + (3.14 / 2));
                    }
                    if ((fxpos1 < fxpos2) && (fypos1 < fypos2))
                    {
                        beta = (-alpha - (3.14 / 2));
                    }

                    if (wID == 24) {
                        camxpos = beta + 0.0410;
                        camypos = theta + 0.0389 + dist / 3000;
                        WriteProcessMemory(hProcess, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera                       
                    }
                    if (wID == 31) {
                        camxpos = beta + 0.0300 + (dist / 14000);
                        camypos = theta + 0.0389 + dist / 3000;
                        WriteProcessMemory(hProcess, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera                       
                    }
                    if (wID == 27) {
                        camxpos = beta + 0.0300 + (dist / 14000);
                        camypos = theta + 0.0389 + dist / 3000;
                        WriteProcessMemory(hProcess, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera                       
                    }
                    if (wID == 32) {
                        camxpos = beta + 0.0300 + (dist / 14000);
                        camypos = theta + 0.0389 + dist / 3000;
                        WriteProcessMemory(hProcess, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera                       
                    }
                    if (wID == 33) {
                        camxpos = beta + 0.0300 + (dist / 14000);
                        camypos = theta + 0.0389 + dist / 3000;
                        WriteProcessMemory(hProcess, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera                       
                    }
                    if (wID == 25) {
                        camxpos = beta + 0.0300 + (dist / 14000);
                        camypos = theta + 0.0389 + dist / 3000;
                        WriteProcessMemory(hProcess, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera                       
                    }
                    if (wID == 23) {
                        camxpos = beta + 0.0300 + (dist / 14000);
                        camypos = theta + 0.0389 + dist / 3000;
                        WriteProcessMemory(hProcess, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera                       
                    }
                    if (wID == 38) {
                        camxpos = beta + 0.0300 + (dist / 14000);
                        camypos = theta + 0.0389 + dist / 3000;
                        WriteProcessMemory(hProcess, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera                       
                    }
                    if (wID == 34) {
                        camxpos = beta + 0.0300 + (dist / 14000);
                        camypos = theta + 0.0389 + dist / 3000;
                        WriteProcessMemory(hProcess, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera                       
                    }
                    if (wID == 30) {
                        camxpos = beta + 0.0300 + (dist / 14000);
                        camypos = theta + 0.0389 + dist / 3000;
                        WriteProcessMemory(hProcess, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera                       
                    }
                    if (wID == 29) {
                        camxpos = beta + 0.0300 + (dist / 14000);
                        camypos = theta + 0.0389 + dist / 3000;
                        WriteProcessMemory(hProcess, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera                       
                    }
                }
            }
        }
 

real_fl1k

Active member
Joined
Apr 23, 2020
Messages
72
Reaction score
8
Location
Belgrade
I'm sure most internals use game functions to tell if the target is hittable or not(behind the wall 4 example), you're gonna need to find those functions and call them using shellcode execution
 
Top