Example #1
0
        bool w2scn(_vec3 from, _vec3 to)
        {
            float w = 0.0f;

            to.x = ViewMatrix[0] * from.x + ViewMatrix[1] * from.y + ViewMatrix[2] * from.z + ViewMatrix[3];
            to.y = ViewMatrix[4] * from.x + ViewMatrix[5] * from.y + ViewMatrix[6] * from.z + ViewMatrix[7];
            w    = ViewMatrix[12] * from.x + ViewMatrix[13] * from.y + ViewMatrix[14] * from.z + ViewMatrix[15];

            if (w < 0.01f)
            {
                return(false);
            }

            float invw = 1.0f / w;

            to.x *= invw;
            to.y *= invw;

            int width  = Width;
            int height = Height;

            float x = width / 2;
            float y = height / 2;

            x += 0.5f * to.x * width + 0.5f;
            y -= 0.5f * to.y * height + 0.5f;

            to.x = x;
            to.y = y;

            W2SNPos.x = to.x;
            W2SNPos.y = to.y;
            return(true);
        }
Example #2
0
            public float distance(_vec3 l, _vec3 e)
            {
                float dist;

                dist = (float)Math.Sqrt(Math.Pow(l.x - e.x, 2) + Math.Pow(l.y - e.y, 2) + Math.Pow(l.z - e.z, 2));
                return(dist);
            }
Example #3
0
        double Distance(_vec3 point1, _vec3 point2)
        {
            double distance = Math.Sqrt(((int)point1.x - (int)point2.x) * ((int)point1.x - (int)point2.x) +
                                        ((int)point1.y - (int)point2.y) * ((int)point1.y - (int)point2.y) +
                                        ((int)point1.z - (int)point2.z) * ((int)point1.z - (int)point2.z));

            distance = Math.Round(distance, 3);
            return(distance);
        }
Example #4
0
        _vec3 GetBonePos(int target, int bone)
        {
            int   bMatrix = _m.rdInt(target + boneMatrix);
            _vec3 vec     = new _vec3();

            vec.x = _m.rdFloat(bMatrix + (0x30 * bone) + 0xC);
            vec.y = _m.rdFloat(bMatrix + (0x30 * bone) + 0x1C);
            vec.z = _m.rdFloat(bMatrix + (0x30 * bone) + 0x2C);
            return(vec);
        }
 public float dot(_vec3 dot)
 {
     return (x * dot.x + y * dot.y + z * dot.z);
 }
 public float distance(_vec3 l, _vec3 e)
 {
     float dist;
     dist = (float)Math.Sqrt(Math.Pow(l.x - e.x, 2) + Math.Pow(l.y - e.y, 2) + Math.Pow(l.z - e.z, 2));
     return dist;
 }
        bool w2scn(_vec3 from, _vec3 to)
        {
            float w = 0.0f;

            to.x = ViewMatrix[0] * from.x + ViewMatrix[1] * from.y + ViewMatrix[2] * from.z + ViewMatrix[3];
            to.y = ViewMatrix[4] * from.x + ViewMatrix[5] * from.y + ViewMatrix[6] * from.z + ViewMatrix[7];
            w = ViewMatrix[12] * from.x + ViewMatrix[13] * from.y + ViewMatrix[14] * from.z + ViewMatrix[15];

            if (w < 0.01f)
                return false;

            float invw = 1.0f / w;
            to.x *= invw;
            to.y *= invw;

            int width = Width;
            int height = Height;

            float x = width / 2;
            float y = height / 2;

            x += 0.5f * to.x * width + 0.5f;
            y -= 0.5f * to.y * height + 0.5f;

            to.x = x;
            to.y = y;

            W2SNPos.x = to.x;
            W2SNPos.y = to.y;
            return true;
        }
 _vec3 GetBonePos(int target, int bone)
 {
     int bMatrix = _m.rdInt(target + boneMatrix);
     _vec3 vec = new _vec3();
     vec.x = _m.rdFloat(bMatrix + (0x30 * bone) + 0xC);
     vec.y = _m.rdFloat(bMatrix + (0x30 * bone) + 0x1C);
     vec.z = _m.rdFloat(bMatrix + (0x30 * bone) + 0x2C);
     return vec;
 }
        int EnemyPosToRadar(_vec3 pos, int player, int yOff)
        {
            float r_1, r_2;
            float x_1, y_1;

            _vec3 LocalPlayerPos;
            LocalPlayerPos = _m.rdVector(GetLocalPlayer() + PosOffset);

            r_1 = -(pos.y - LocalPlayerPos.y); //Get the player's position in relation to my own, being as I'm the center of the radar.
            r_2 = pos.x - LocalPlayerPos.x;

            _vec3 eyeAngles = GetEyeAngles();
            float Yaw = eyeAngles.y - 90.0f;

            float yawToRadian = D3DXToRadian(Yaw);
            x_1 = (float)(r_2 * (float)Math.Cos((double)(yawToRadian)) - r_1 * Math.Sin((double)(yawToRadian))) / 20; // Try to calculate their X & Y on the radar, using their position relative to me, and also taking my yaw into account
            y_1 = (float)(r_2 * (float)Math.Sin((double)(yawToRadian)) + r_1 * Math.Cos((double)(yawToRadian))) / 20;

            //x_1 *= 2;
            x_1 += 123; // this adds half the width of the radar to the x pos

            y_1 += 599; // + half height.

            //Draws this code so I can see the numbers incase they're just retarded

            /* Clamps */
            if (x_1 < 25)
            {
                x_1 = 25;
            }
            if (x_1 > 220)
            {
                x_1 = 220;
            }

            if (y_1 > 697)
            {
                y_1 = 697;
            }
            if (y_1 < 502)
            {
                y_1 = 502;
            }
            /* Clamps */

            /* Colors the box in relation to their team #*/
            y_1 += yOff;
            int enemyTeam = _m.rdInt(player + teamoff);
            int localTeam = _m.rdInt(GetLocalPlayer() + teamoff);
            if (enemyTeam == localTeam)
            {
                if (pos.z - LocalPlayerPos.z > 75)
                {
                    FillRGB(x_1, y_1, 5, 5, 255, 0, 255, 255); // Purple
                }
                else if (pos.z - LocalPlayerPos.z < -75)
                {
                    FillRGB(x_1, y_1, 5, 5, 7, 223, 255, 255);// Light Blue
                }
                else
                {
                    FillRGB(x_1, y_1, 5, 5, 0, 255, 0, 255);// Green
                }
            }

            if (enemyTeam != localTeam)
            {
                if (pos.z - LocalPlayerPos.z > 75)
                {
                    FillRGB(x_1, y_1, 5, 5, 255, 255, 0, 255); // Yellow
                }
                else if (pos.z - LocalPlayerPos.z < -75)
                {
                    FillRGB(x_1, y_1, 5, 5, 255, 111, 0, 255);// Orange
                }
                else
                {
                    FillRGB(x_1, y_1, 5, 5, 255, 0, 0, 255); // Red
                }
            }
            return 0;
        }
        private void dxThread()
        {
            _m.StartProcess();
            _client = _m.DllImageAddress("client.dll");
            while (true)
            {
                //Time how long this shit takes
                System.Diagnostics.Stopwatch s = new System.Diagnostics.Stopwatch();
                s.Start();

                //Do d3d shit
                device.Clear(D3D.ClearFlags.Target, Color.FromArgb(0, 0, 0, 0), 1.0f, 0);
                device.RenderState.ZBufferEnable = false;
                device.RenderState.Lighting = false;
                device.RenderState.CullMode = D3D.Cull.None;
                device.Transform.Projection = Matrix.OrthoOffCenterLH(0, this.Width, this.Height, 0, 0, 1);
                device.BeginScene();

                //Local Player Reads
                int LocalPlayer = _m.rdInt(_client + pBaseOff);
                int LocalPlayerHealth = _m.rdInt(LocalPlayer + hOff);
                int LocalTeam = _m.rdInt(LocalPlayer + teamoff);
                _vec3 playerPos = GetPlayerPosition();
                //Recoil crosshair, f**k toggles
                if (GetAsyncKeyState(0x001) != 0)
                {
                    _vec3 punchAngs = _m.rdVector(LocalPlayer + pAngs);
                    int crX = this.Width / 2, crY = this.Height / 2;
                    int dy = this.Height / 90;
                    int dx = this.Width / 90;

                    int drX = crX - (int)(dx * (punchAngs.y)) + fuckingshitoffsetfuck;
                    int drY = crY + (int)(dy * (punchAngs.x)) + fuckingshitoffsetfuck;

                    DrawLine(drX - 6, drY, drX + 6, drY, 1, Color.Red);
                    DrawLine(drX, drY - 6, drX, drY + 6, 1, Color.Red);
                }

                //Draw the radar

                int yOff = this.Height - 600-200;
                DrawGUIBox(25, yOff + 501, 200, 200, 255, 255, 255, 200, 0, 0, 0, 0);
                //GradientFunc(25, yOff + 500, 200, 200, 10, 10, 80, 250);
                FillRGB(25, yOff + 500, 200, 200, 90, 90, 90, 255);
                DrawLine(25, yOff + 500, 125, yOff + 600, 150, 150, 150, 255);
                DrawLine(225, yOff + 500, 125, yOff + 600, 150, 150, 150, 255);
                DrawLine(125, yOff + 600, 125, yOff + 700, 150, 150, 150, 255);
                DrawLine(25, yOff + 600, 225, yOff + 600, 150, 150, 150, 255);

                FillRGB(124, yOff + 600, 3, 3, 255, 255, 255, 255);

                //ViewMatrix Read
                //Mind you this is terribly inefficient
                for (int j = 0; j < 16; j++)
                    ViewMatrix[j] = _m.rdFloat(_client + 0x4A04564 + (j * 0x4));

                //Entity Loop
                for (int i = 0; i < 64; i++)
                {
                    int ent = _m.rdInt(_client + entList + (i * 0x10));

                    if (ent == 0 || ent == LocalPlayer)
                        continue;
                    int entHealth = _m.rdInt(ent + hOff);
                    if (entHealth == 0)
                        continue;
                    int entTeam = _m.rdInt(ent + teamoff);
                    _vec3 entPos = GetentPosition(i);
                    _vec3 test = new _vec3();

                    //Draw them on the Radar
                    EnemyPosToRadar(entPos, ent, yOff);
                    //Radar Done

                    if (w2scn(entPos, test))
                    {
                        Point pos = new Point((int)W2SNPos.x, (int)W2SNPos.y);

                        Color col;
                        if (entTeam != LocalTeam)
                        {
                            col = Color.Red;
                        }
                        else
                        {
                            col = Color.Green;
                        }
                        if (esp)
                        {
                            _ShadowText("" + entHealth, pos, col);
                            _vec3 head = GetBonePos(ent, 10);
                            if (w2scn(head, test))
                            {
                                float height = W2SNPos.y - pos.Y;
                                float headPosx = W2SNPos.x;
                                float headPosy = W2SNPos.y;
                                //Box
                                DrawLine(pos.X - (height / 4), headPosy, pos.X - (height / 4), pos.Y, 1, col);
                                DrawLine(pos.X + (height / 4), headPosy, pos.X + (height / 4), pos.Y, 1, col);
                                DrawLine(pos.X - (height / 4), headPosy, pos.X + (height / 4), headPosy, 1, col);
                                DrawLine(pos.X - (height / 4), pos.Y, pos.X + (height / 4), pos.Y, 1, col);

                                //Line
                                //DrawLine(pos.X, headPosy, pos.X, pos.Y,1, col);

                            }
                        }
                    }

                }

                int TextX = 15;

                //Draw a little box thing
                DrawTransparentBox(0, 0, 250, 20, 175, Color.Black);
                //Hack title, f**k you
                _ShadowText("CSGO Overlay by Jumbo and Mambda", new Point(1, 0), Color.DeepSkyBlue);
                //Little lines to look cool and shit
                DrawLine(250, 0, 250, 20, 1, Color.DeepSkyBlue);
                DrawLine(0, 20, 250, 20, 1, Color.DeepSkyBlue);

                s.Stop();
                //See how long that shit took
                _ShadowText("" + s.ElapsedMilliseconds + "ms", new Point(220, 0), Color.DeepSkyBlue);
                device.EndScene();
                device.Present();
                //End that d3d shit
            }
        }
 double Distance(_vec3 point1, _vec3 point2)
 {
     double distance = Math.Sqrt(((int)point1.x - (int)point2.x) * ((int)point1.x - (int)point2.x) +
         ((int)point1.y - (int)point2.y) * ((int)point1.y - (int)point2.y) +
         ((int)point1.z - (int)point2.z) * ((int)point1.z - (int)point2.z));
     distance = Math.Round(distance, 3);
     return distance;
 }
Example #12
0
        private void dxThread()
        {
            _m.StartProcess();
            _client = _m.DllImageAddress("client.dll");
            while (true)
            {
                //Time how long this shit takes
                System.Diagnostics.Stopwatch s = new System.Diagnostics.Stopwatch();
                s.Start();

                //Do d3d shit
                device.Clear(D3D.ClearFlags.Target, Color.FromArgb(0, 0, 0, 0), 1.0f, 0);
                device.RenderState.ZBufferEnable = false;
                device.RenderState.Lighting      = false;
                device.RenderState.CullMode      = D3D.Cull.None;
                device.Transform.Projection      = Matrix.OrthoOffCenterLH(0, this.Width, this.Height, 0, 0, 1);
                device.BeginScene();

                //Local Player Reads
                int   LocalPlayer       = _m.rdInt(_client + pBaseOff);
                int   LocalPlayerHealth = _m.rdInt(LocalPlayer + hOff);
                int   LocalTeam         = _m.rdInt(LocalPlayer + teamoff);
                _vec3 playerPos         = GetPlayerPosition();
                //Recoil crosshair, f**k toggles
                if (GetAsyncKeyState(0x001) != 0)
                {
                    _vec3 punchAngs = _m.rdVector(LocalPlayer + pAngs);
                    int   crX = this.Width / 2, crY = this.Height / 2;
                    int   dy = this.Height / 90;
                    int   dx = this.Width / 90;

                    int drX = crX - (int)(dx * (punchAngs.y)) + fuckingshitoffsetfuck;
                    int drY = crY + (int)(dy * (punchAngs.x)) + fuckingshitoffsetfuck;

                    DrawLine(drX - 6, drY, drX + 6, drY, 1, Color.Red);
                    DrawLine(drX, drY - 6, drX, drY + 6, 1, Color.Red);
                }


                //Draw the radar

                int yOff = this.Height - 600 - 200;
                DrawGUIBox(25, yOff + 501, 200, 200, 255, 255, 255, 200, 0, 0, 0, 0);
                //GradientFunc(25, yOff + 500, 200, 200, 10, 10, 80, 250);
                FillRGB(25, yOff + 500, 200, 200, 90, 90, 90, 255);
                DrawLine(25, yOff + 500, 125, yOff + 600, 150, 150, 150, 255);
                DrawLine(225, yOff + 500, 125, yOff + 600, 150, 150, 150, 255);
                DrawLine(125, yOff + 600, 125, yOff + 700, 150, 150, 150, 255);
                DrawLine(25, yOff + 600, 225, yOff + 600, 150, 150, 150, 255);

                FillRGB(124, yOff + 600, 3, 3, 255, 255, 255, 255);

                //ViewMatrix Read
                //Mind you this is terribly inefficient
                for (int j = 0; j < 16; j++)
                {
                    ViewMatrix[j] = _m.rdFloat(_client + 0x4A04564 + (j * 0x4));
                }

                //Entity Loop
                for (int i = 0; i < 64; i++)
                {
                    int ent = _m.rdInt(_client + entList + (i * 0x10));

                    if (ent == 0 || ent == LocalPlayer)
                    {
                        continue;
                    }
                    int entHealth = _m.rdInt(ent + hOff);
                    if (entHealth == 0)
                    {
                        continue;
                    }
                    int   entTeam = _m.rdInt(ent + teamoff);
                    _vec3 entPos  = GetentPosition(i);
                    _vec3 test    = new _vec3();

                    //Draw them on the Radar
                    EnemyPosToRadar(entPos, ent, yOff);
                    //Radar Done

                    if (w2scn(entPos, test))
                    {
                        Point pos = new Point((int)W2SNPos.x, (int)W2SNPos.y);

                        Color col;
                        if (entTeam != LocalTeam)
                        {
                            col = Color.Red;
                        }
                        else
                        {
                            col = Color.Green;
                        }
                        if (esp)
                        {
                            _ShadowText("" + entHealth, pos, col);
                            _vec3 head = GetBonePos(ent, 10);
                            if (w2scn(head, test))
                            {
                                float height   = W2SNPos.y - pos.Y;
                                float headPosx = W2SNPos.x;
                                float headPosy = W2SNPos.y;
                                //Box
                                DrawLine(pos.X - (height / 4), headPosy, pos.X - (height / 4), pos.Y, 1, col);
                                DrawLine(pos.X + (height / 4), headPosy, pos.X + (height / 4), pos.Y, 1, col);
                                DrawLine(pos.X - (height / 4), headPosy, pos.X + (height / 4), headPosy, 1, col);
                                DrawLine(pos.X - (height / 4), pos.Y, pos.X + (height / 4), pos.Y, 1, col);

                                //Line
                                //DrawLine(pos.X, headPosy, pos.X, pos.Y,1, col);
                            }
                        }
                    }
                }


                int TextX = 15;

                //Draw a little box thing
                DrawTransparentBox(0, 0, 250, 20, 175, Color.Black);
                //Hack title, f**k you
                _ShadowText("CSGO Overlay by Jumbo and Mambda", new Point(1, 0), Color.DeepSkyBlue);
                //Little lines to look cool and shit
                DrawLine(250, 0, 250, 20, 1, Color.DeepSkyBlue);
                DrawLine(0, 20, 250, 20, 1, Color.DeepSkyBlue);

                s.Stop();
                //See how long that shit took
                _ShadowText("" + s.ElapsedMilliseconds + "ms", new Point(220, 0), Color.DeepSkyBlue);
                device.EndScene();
                device.Present();
                //End that d3d shit
            }
        }
Example #13
0
        int EnemyPosToRadar(_vec3 pos, int player, int yOff)
        {
            float r_1, r_2;
            float x_1, y_1;

            _vec3 LocalPlayerPos;

            LocalPlayerPos = _m.rdVector(GetLocalPlayer() + PosOffset);

            r_1 = -(pos.y - LocalPlayerPos.y); //Get the player's position in relation to my own, being as I'm the center of the radar.
            r_2 = pos.x - LocalPlayerPos.x;

            _vec3 eyeAngles = GetEyeAngles();
            float Yaw       = eyeAngles.y - 90.0f;

            float yawToRadian = D3DXToRadian(Yaw);

            x_1 = (float)(r_2 * (float)Math.Cos((double)(yawToRadian)) - r_1 * Math.Sin((double)(yawToRadian))) / 20; // Try to calculate their X & Y on the radar, using their position relative to me, and also taking my yaw into account
            y_1 = (float)(r_2 * (float)Math.Sin((double)(yawToRadian)) + r_1 * Math.Cos((double)(yawToRadian))) / 20;

            //x_1 *= 2;
            x_1 += 123; // this adds half the width of the radar to the x pos

            y_1 += 599; // + half height.

            //Draws this code so I can see the numbers incase they're just retarded

            /* Clamps */
            if (x_1 < 25)
            {
                x_1 = 25;
            }
            if (x_1 > 220)
            {
                x_1 = 220;
            }

            if (y_1 > 697)
            {
                y_1 = 697;
            }
            if (y_1 < 502)
            {
                y_1 = 502;
            }
            /* Clamps */

            /* Colors the box in relation to their team #*/
            y_1 += yOff;
            int enemyTeam = _m.rdInt(player + teamoff);
            int localTeam = _m.rdInt(GetLocalPlayer() + teamoff);

            if (enemyTeam == localTeam)
            {
                if (pos.z - LocalPlayerPos.z > 75)
                {
                    FillRGB(x_1, y_1, 5, 5, 255, 0, 255, 255); // Purple
                }
                else if (pos.z - LocalPlayerPos.z < -75)
                {
                    FillRGB(x_1, y_1, 5, 5, 7, 223, 255, 255);// Light Blue
                }
                else
                {
                    FillRGB(x_1, y_1, 5, 5, 0, 255, 0, 255);// Green
                }
            }

            if (enemyTeam != localTeam)
            {
                if (pos.z - LocalPlayerPos.z > 75)
                {
                    FillRGB(x_1, y_1, 5, 5, 255, 255, 0, 255); // Yellow
                }
                else if (pos.z - LocalPlayerPos.z < -75)
                {
                    FillRGB(x_1, y_1, 5, 5, 255, 111, 0, 255);// Orange
                }
                else
                {
                    FillRGB(x_1, y_1, 5, 5, 255, 0, 0, 255); // Red
                }
            }
            return(0);
        }
Example #14
0
 public float dot(_vec3 dot)
 {
     return(x * dot.x + y * dot.y + z * dot.z);
 }