Exemple #1
0
        public static void Run()
        {
            while (true)
            {
                if (Imports.IsWindowFocues(menu.GameProcess))
                {
                    if (Convert.ToBoolean((long)Imports.GetAsyncKeyState(Settings.Aimbot.Key) & 0x8000) || Convert.ToBoolean((long)Imports.GetAsyncKeyState(Settings.Aimbot.SecondKey) & 0x8000) && Structs.LocalPlayer.Health.IsAlive()) //&& !Convert.ToBoolean((long)Globals.Imports.GetAsyncKeyState(Settings.Trigger.Key) & 0x8000)
                    {
                        if (Settings.Aimbot.UseMouseEvent)
                        {
                            Thread.Sleep(Settings.Aimbot.Smooth == 0f ? 1 : 25);
                            int    maxPlayers = Structs.ClientState.MaxPlayers;
                            byte[] entities   = MemoryManager.ReadMemory((int)Structs.Base.Client + Offsets.dwEntityList, maxPlayers * 0x10);
                            Dictionary <float, Vector3> possibleTargets = new Dictionary <float, Vector3> {
                            };
                            if (Reader.WeaponID == 42 || Reader.WeaponID == 59 || Reader.WeaponID == 262667 || Reader.WeaponID == 262666 || Reader.WeaponID == 262633 || Reader.WeaponID == 262651 || Reader.WeaponID == 262664)
                            {
                                continue;
                            }
                            for (int i = 0; i < maxPlayers; i++)
                            {
                                int cEntity = Math.GetInt(entities, i * 0x10);

                                Structs.Enemy_t entityStruct = MemoryManager.ReadMemory <Structs.Enemy_t>(cEntity);

                                if (!entityStruct.Team.HasTeam() ||
                                    entityStruct.Team.IsMyTeam() ||
                                    !entityStruct.Health.IsAlive())
                                {
                                    continue;
                                }

                                Vector3 bonePosition = Math.GetBonePos(cEntity, Settings.Aimbot.Bone);
                                if (bonePosition == Vector3.Zero)
                                {
                                    continue;
                                }

                                //////////bSpotedCheck//////////////
                                if (Settings.Aimbot.VisibleOnly)
                                {
                                    int EnemySpoted = MemoryManager.ReadMemory <int>(cEntity + Offsets.m_bSpottedByMask);
                                    if (EnemySpoted == 0 || EnemySpoted % 2 == 0)
                                    {
                                        continue;
                                    }
                                }
                                //////////endbSpotedCheck///////////

                                Vector3 destination = Settings.Aimbot.RecoilControl
                                    ? Math.CalcAngle(Structs.LocalPlayer.Position, bonePosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, Settings.Aimbot.YawRecoilReductionFactory, Settings.Aimbot.PitchRecoilReductionFactory)
                                    : Math.CalcAngle(Structs.LocalPlayer.Position, bonePosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, 0f, 0f);

                                if (destination == Vector3.Zero)
                                {
                                    continue;
                                }

                                float distance = Math.GetDistance3D(destination, Structs.ClientState.ViewAngles);

                                //////////////////////////////NEAREST SEQENCE//////////////////////////////
                                if (Settings.Aimbot.Bone == 0)
                                {
                                    Vector3 headPosition    = Math.GetBonePos(cEntity, 8);
                                    Vector3 neckPosition    = Math.GetBonePos(cEntity, 7);
                                    Vector3 chestPosition   = Math.GetBonePos(cEntity, 6);
                                    Vector3 StomachPosition = Math.GetBonePos(cEntity, 5);


                                    if (headPosition == Vector3.Zero)
                                    {
                                        continue;
                                    }

                                    Vector3 HeadDestination = Settings.Aimbot.RecoilControl ? Math.CalcAngle(Structs.LocalPlayer.Position, headPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, Settings.Aimbot.YawRecoilReductionFactory, Settings.Aimbot.PitchRecoilReductionFactory) : Math.CalcAngle(Structs.LocalPlayer.Position, headPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, 0f, 0f);
                                    float   HeadDistance    = Math.GetDistance3D(HeadDestination, Structs.ClientState.ViewAngles);



                                    if (neckPosition == Vector3.Zero)
                                    {
                                        continue;
                                    }
                                    Vector3 NeckDestination = Settings.Aimbot.RecoilControl ? Math.CalcAngle(Structs.LocalPlayer.Position, neckPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, Settings.Aimbot.YawRecoilReductionFactory, Settings.Aimbot.PitchRecoilReductionFactory) : Math.CalcAngle(Structs.LocalPlayer.Position, neckPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, 0f, 0f);
                                    float   NeckDistance    = Math.GetDistance3D(NeckDestination, Structs.ClientState.ViewAngles);



                                    if (chestPosition == Vector3.Zero)
                                    {
                                        continue;
                                    }

                                    Vector3 ChestDestination = Settings.Aimbot.RecoilControl ? Math.CalcAngle(Structs.LocalPlayer.Position, chestPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, Settings.Aimbot.YawRecoilReductionFactory, Settings.Aimbot.PitchRecoilReductionFactory) : Math.CalcAngle(Structs.LocalPlayer.Position, chestPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, 0f, 0f);
                                    float   ChestDistance    = Math.GetDistance3D(ChestDestination, Structs.ClientState.ViewAngles);



                                    if (StomachPosition == Vector3.Zero)
                                    {
                                        continue;
                                    }
                                    Vector3 StomachDestination = Settings.Aimbot.RecoilControl ? Math.CalcAngle(Structs.LocalPlayer.Position, chestPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, Settings.Aimbot.YawRecoilReductionFactory, Settings.Aimbot.PitchRecoilReductionFactory) : Math.CalcAngle(Structs.LocalPlayer.Position, chestPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, 0f, 0f);

                                    float StomachDistance  = Math.GetDistance3D(ChestDestination, Structs.ClientState.ViewAngles);
                                    float ComapreHeadNeck  = HeadDistance - NeckDistance;
                                    float ComapreHeadChest = HeadDistance - ChestDistance;

                                    double HeadDistance2  = (double)HeadDistance;
                                    double NeckDistance2  = (double)NeckDistance;
                                    double ChestDistance2 = (double)ChestDistance;

                                    if (HeadDistance2 < NeckDistance2 && HeadDistance2 < ChestDistance2)
                                    {
                                        destination = HeadDestination;
                                        distance    = HeadDistance;
                                    }
                                    if (NeckDistance2 < HeadDistance2 && NeckDistance2 < ChestDistance2)
                                    {
                                        destination = NeckDestination;
                                        distance    = NeckDistance;
                                    }
                                    if (ChestDistance2 < HeadDistance2 && ChestDistance2 < NeckDistance2)
                                    {
                                        destination = ChestDestination;
                                        distance    = ChestDistance;
                                    }
                                }
                                ////////////////////////////END NEAREST///////////////////////////////////

                                Vector3 distance2 = destination - Structs.ClientState.ViewAngles;
                                if (!(distance <= Settings.Aimbot.Fov))
                                {
                                    continue;
                                }
                                possibleTargets.Add(distance, distance2);
                            }
                            if (!possibleTargets.Any())
                            {
                                continue;
                            }
                            Vector3 aimAngle = possibleTargets.OrderByDescending(x => x.Key).LastOrDefault().Value;
                            if (aimAngle.Y > 0.35 && aimAngle.Y < Settings.Aimbot.Fov)
                            {
                                Imports.mouse_event(0x01, -(int)Settings.Aimbot.Smooth, 0, 0, 0);
                            }
                            else if (aimAngle.Y < -0.35 && aimAngle.Y > -Settings.Aimbot.Fov)
                            {
                                Imports.mouse_event(0x01, (int)Settings.Aimbot.Smooth, 0, 0, 0);
                            }
                            if (aimAngle.X > 0.35)
                            {
                                Imports.mouse_event(0x01, 0, (int)Settings.Aimbot.Smooth, 0, 0);
                            }
                            else if (aimAngle.X < -0.35)
                            {
                                Imports.mouse_event(0x01, 0, -(int)Settings.Aimbot.Smooth, 0, 0);
                            }
                        }
                        else
                        {
                            Thread.Sleep(Settings.Aimbot.Smooth == 0f ? 1 : 40);
                            int    maxPlayers = Structs.ClientState.MaxPlayers;
                            byte[] entities   = MemoryManager.ReadMemory((int)Structs.Base.Client + Offsets.dwEntityList, maxPlayers * 0x10);
                            Dictionary <float, Vector3> possibleTargets = new Dictionary <float, Vector3> {
                            };

                            for (int i = 0; i < maxPlayers; i++)
                            {
                                int cEntity = Math.GetInt(entities, i * 0x10);

                                Structs.Enemy_t entityStruct = MemoryManager.ReadMemory <Structs.Enemy_t>(cEntity);

                                if (!entityStruct.Team.HasTeam() || entityStruct.Team.IsMyTeam() || !entityStruct.Health.IsAlive())
                                {
                                    continue;
                                }

                                Vector3 bonePosition = Math.GetBonePos(cEntity, Settings.Aimbot.Bone);
                                if (bonePosition == Vector3.Zero)
                                {
                                    continue;
                                }


                                //////////bSpotedCheck//////////////
                                if (Settings.Aimbot.VisibleOnly)
                                {
                                    int EnemySpoted = MemoryManager.ReadMemory <int>(cEntity + Offsets.m_bSpottedByMask);
                                    if (EnemySpoted == 0 || EnemySpoted % 2 == 0)
                                    {
                                        continue;
                                    }
                                }
                                //////////endbSpotedCheck///////////


                                Vector3 destination = Settings.Aimbot.RecoilControl ? Math.CalcAngle(Structs.LocalPlayer.Position, bonePosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, Settings.Aimbot.YawRecoilReductionFactory, Settings.Aimbot.PitchRecoilReductionFactory) : Math.CalcAngle(Structs.LocalPlayer.Position, bonePosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, 0f, 0f);
                                if (destination == Vector3.Zero)
                                {
                                    continue;
                                }
                                float distance = Math.GetDistance3D(destination, Structs.ClientState.ViewAngles);

                                //////////////////////////////NEAREST SEQENCE//////////////////////////////
                                if (Settings.Aimbot.Bone == 0)
                                {
                                    Vector3 headPosition  = Math.GetBonePos(cEntity, 8);
                                    Vector3 neckPosition  = Math.GetBonePos(cEntity, 7);
                                    Vector3 chestPosition = Math.GetBonePos(cEntity, 6);
                                    //   Vector3 StomachPosition = Math.GetBonePos(cEntity, 5);

                                    if (headPosition == Vector3.Zero)
                                    {
                                        continue;
                                    }

                                    Vector3 HeadDestination = Settings.Aimbot.RecoilControl ? Math.CalcAngle(Structs.LocalPlayer.Position, headPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, Settings.Aimbot.YawRecoilReductionFactory, Settings.Aimbot.PitchRecoilReductionFactory) : Math.CalcAngle(Structs.LocalPlayer.Position, headPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, 0f, 0f);
                                    float   HeadDistance    = Math.GetDistance3D(HeadDestination, Structs.ClientState.ViewAngles);

                                    if (neckPosition == Vector3.Zero)
                                    {
                                        continue;
                                    }

                                    Vector3 NeckDestination = Settings.Aimbot.RecoilControl ? Math.CalcAngle(Structs.LocalPlayer.Position, neckPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, Settings.Aimbot.YawRecoilReductionFactory, Settings.Aimbot.PitchRecoilReductionFactory) : Math.CalcAngle(Structs.LocalPlayer.Position, neckPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, 0f, 0f);
                                    float   NeckDistance    = Math.GetDistance3D(NeckDestination, Structs.ClientState.ViewAngles);

                                    if (chestPosition == Vector3.Zero)
                                    {
                                        continue;
                                    }

                                    Vector3 ChestDestination = Settings.Aimbot.RecoilControl ? Math.CalcAngle(Structs.LocalPlayer.Position, chestPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, Settings.Aimbot.YawRecoilReductionFactory, Settings.Aimbot.PitchRecoilReductionFactory) : Math.CalcAngle(Structs.LocalPlayer.Position, chestPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, 0f, 0f);
                                    float   ChestDistance    = Math.GetDistance3D(ChestDestination, Structs.ClientState.ViewAngles);

                                    /*
                                     * if (StomachPosition == Vector3.Zero) continue;
                                     * Vector3 StomachDestination = Settings.Aimbot.RecoilControl ? Math.CalcAngle(Structs.LocalPlayer.Position, chestPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, Settings.Aimbot.YawRecoilReductionFactory, Settings.Aimbot.PitchRecoilReductionFactory) : Math.CalcAngle(Structs.LocalPlayer.Position, chestPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, 0f, 0f);
                                     * float StomachDistance = Math.GetDistance3D(ChestDestination, Structs.ClientState.ViewAngles);
                                     */

                                    double HeadDistance2  = (double)HeadDistance;
                                    double NeckDistance2  = (double)NeckDistance;
                                    double ChestDistance2 = (double)ChestDistance;

                                    if (HeadDistance2 < NeckDistance2 && HeadDistance2 < ChestDistance2)
                                    {
                                        destination = HeadDestination;
                                        distance    = HeadDistance;
                                    }
                                    if (NeckDistance2 < HeadDistance2 && NeckDistance2 < ChestDistance2)
                                    {
                                        destination = NeckDestination;
                                        distance    = NeckDistance;
                                    }
                                    if (ChestDistance2 < HeadDistance2 && ChestDistance2 < NeckDistance2)
                                    {
                                        destination = ChestDestination;
                                        distance    = ChestDistance;
                                    }
                                }

                                if (!(distance <= Settings.Aimbot.Fov))
                                {
                                    continue;
                                }
                                possibleTargets.Add(distance, destination);
                            }
                            if (!possibleTargets.Any())
                            {
                                continue;
                            }

                            Vector3 aimAngle = possibleTargets.OrderByDescending(x => x.Key).LastOrDefault().Value;

                            if (Settings.Aimbot.Curve)
                            {
                                Vector3 qDelta = aimAngle - Structs.ClientState.ViewAngles;
                                qDelta  += new Vector3(qDelta.Y / Settings.Aimbot.CurveY, qDelta.X / Settings.Aimbot.CurveX, qDelta.Z);
                                aimAngle = Structs.ClientState.ViewAngles + qDelta;
                            }

                            aimAngle = Math.NormalizeAngle(aimAngle);
                            aimAngle = Math.ClampAngle(aimAngle);


                            MemoryManager.WriteMemory <Vector3>(Structs.ClientState.Base + Offsets.dwClientState_ViewAngles, Settings.Aimbot.Smooth == 0f ? aimAngle : Math.SmoothAim(Structs.ClientState.ViewAngles, aimAngle, Settings.Aimbot.Smooth));
                        }
                    }
                }
                else
                {
                    Thread.Sleep(100);
                }
            }
        }
        public static void Run()
        {
            while (true)
            {
                Thread.Sleep(1);
                if (Imports.IsWindowFocues(menu.GameProcess))
                {
                    if (Convert.ToBoolean((long)Imports.GetAsyncKeyState(Settings.Aimbot.SecondKey) & 0x8000) && Structs.LocalPlayer.Health.IsAlive())
                    {
                        int    maxPlayers = Structs.ClientState.MaxPlayers;
                        byte[] entities   = MemoryManager.ReadMemory((int)Structs.Base.Client + Offsets.dwEntityList, maxPlayers * 0x10);
                        Dictionary <float, Vector3> possibleTargets = new Dictionary <float, Vector3> {
                        };

                        for (int i = 0; i < maxPlayers; i++)
                        {
                            int cEntity = Math.GetInt(entities, i * 0x10);

                            Structs.Enemy_t entityStruct = MemoryManager.ReadMemory <Structs.Enemy_t>(cEntity);

                            if (!entityStruct.Team.HasTeam() ||
                                entityStruct.Team.IsMyTeam() ||
                                !entityStruct.Health.IsAlive())
                            {
                                continue;
                            }

                            Vector3 bonePosition = Math.GetBonePos(cEntity, Settings.Aimbot.Bone);
                            if (bonePosition == Vector3.Zero)
                            {
                                continue;
                            }

                            Vector3 destination = Settings.Aimbot.RecoilControl
                                 ? Math.CalcAngle(Structs.LocalPlayer.Position, bonePosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, Settings.Aimbot.YawRecoilReductionFactory, Settings.Aimbot.PitchRecoilReductionFactory)
                                 : Math.CalcAngle(Structs.LocalPlayer.Position, bonePosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, 0f, 0f);

                            if (destination == Vector3.Zero)
                            {
                                continue;
                            }

                            float distance = Math.GetDistance3D(destination, Structs.ClientState.ViewAngles);
                            //////////////////////////////NEAREST SEQENCE//////////////////////////////
                            if (Settings.Aimbot.Bone == 0)
                            {
                                Vector3 headPosition    = Math.GetBonePos(cEntity, 8);
                                Vector3 neckPosition    = Math.GetBonePos(cEntity, 7);
                                Vector3 chestPosition   = Math.GetBonePos(cEntity, 6);
                                Vector3 StomachPosition = Math.GetBonePos(cEntity, 5);


                                if (headPosition == Vector3.Zero)
                                {
                                    continue;
                                }
                                Vector3 HeadDestination = Settings.Aimbot.RecoilControl
                                                                ? Math.CalcAngle(Structs.LocalPlayer.Position, headPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, Settings.Aimbot.YawRecoilReductionFactory, Settings.Aimbot.PitchRecoilReductionFactory)
                                                                : Math.CalcAngle(Structs.LocalPlayer.Position, headPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, 0f, 0f);
                                float HeadDistance = Math.GetDistance3D(HeadDestination, Structs.ClientState.ViewAngles);



                                if (neckPosition == Vector3.Zero)
                                {
                                    continue;
                                }
                                Vector3 NeckDestination = Settings.Aimbot.RecoilControl
                                                                ? Math.CalcAngle(Structs.LocalPlayer.Position, neckPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, Settings.Aimbot.YawRecoilReductionFactory, Settings.Aimbot.PitchRecoilReductionFactory)
                                                                : Math.CalcAngle(Structs.LocalPlayer.Position, neckPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, 0f, 0f);
                                float NeckDistance = Math.GetDistance3D(NeckDestination, Structs.ClientState.ViewAngles);



                                if (chestPosition == Vector3.Zero)
                                {
                                    continue;
                                }

                                Vector3 ChestDestination = Settings.Aimbot.RecoilControl
                                                                ? Math.CalcAngle(Structs.LocalPlayer.Position, chestPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, Settings.Aimbot.YawRecoilReductionFactory, Settings.Aimbot.PitchRecoilReductionFactory)
                                                                : Math.CalcAngle(Structs.LocalPlayer.Position, chestPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, 0f, 0f);
                                float ChestDistance = Math.GetDistance3D(ChestDestination, Structs.ClientState.ViewAngles);



                                if (StomachPosition == Vector3.Zero)
                                {
                                    continue;
                                }
                                Vector3 StomachDestination = Settings.Aimbot.RecoilControl
                                                                ? Math.CalcAngle(Structs.LocalPlayer.Position, chestPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, Settings.Aimbot.YawRecoilReductionFactory, Settings.Aimbot.PitchRecoilReductionFactory)
                                                                : Math.CalcAngle(Structs.LocalPlayer.Position, chestPosition, Structs.LocalPlayer.AimPunch, Structs.LocalPlayer.VecView, 0f, 0f);

                                float StomachDistance  = Math.GetDistance3D(ChestDestination, Structs.ClientState.ViewAngles);
                                float ComapreHeadNeck  = HeadDistance - NeckDistance;
                                float ComapreHeadChest = HeadDistance - ChestDistance;

                                double HeadDistance2  = (double)HeadDistance;
                                double NeckDistance2  = (double)NeckDistance;
                                double ChestDistance2 = (double)ChestDistance;

                                if (HeadDistance2 < NeckDistance2 && HeadDistance2 < ChestDistance2)
                                {
                                    destination = HeadDestination;
                                    distance    = HeadDistance;
                                }
                                if (NeckDistance2 < HeadDistance2 && NeckDistance2 < ChestDistance2)
                                {
                                    destination = NeckDestination;
                                    distance    = NeckDistance;
                                }
                                if (ChestDistance2 < HeadDistance2 && ChestDistance2 < NeckDistance2)
                                {
                                    destination = ChestDestination;
                                    distance    = ChestDistance;
                                }
                            }
                            ////////////////////////////END NEAREST///////////////////////////////////

                            if (distance < 0.5)
                            {
                                //   Console.WriteLine(distance.ToString());
                                MemoryManager.WriteMemory <int>((int)Structs.Base.Client + Offsets.dwForceAttack, 5);
                                Thread.Sleep(1);
                                MemoryManager.WriteMemory <int>((int)Structs.Base.Client + Offsets.dwForceAttack, 4);
                            }
                        }
                    }
                }
                else
                {
                    Thread.Sleep(49);
                }
            }
        }
        public static void Run()
        {
            while (true)
            {
                Thread.Sleep(1);

                if (!Imports.IsWindowFocues(Orion.menu.GameProcess))
                {
                    continue;
                }
                Thread.Sleep(Settings.Sonar.interval);
                try
                {
                    if (Convert.ToBoolean((long)Imports.GetAsyncKeyState(Settings.Sonar.Key) & 0x8000))
                    {
                        int           maxplayers      = Structs.ClientState.MaxPlayers;
                        byte[]        entities        = MemoryManager.ReadMemory((int)Structs.Base.Client + Offsets.dwEntityList, maxplayers * 0x10); //Getting list of entites. Entity = gameobject (guns,players, props etc)
                        List <double> possibleTargets = new List <double> {
                        };

                        for (int i = 0; i < maxplayers; i++)
                        {
                            int Entity = Math.GetInt(entities, i * 0x10);

                            /*          int EntityTeam = MemoryManager.ReadMemory<int>((int)Entity + Offsets.m_iTeamNum);
                             *        if (EntityTeam != 2 && EntityTeam != 3) continue;
                             *        int PlayerTeam = MemoryManager.ReadMemory<int>(Structs.LocalPlayer.Base + Offsets.m_iTeamNum); //Reading client player team
                             *        if (EntityTeam == PlayerTeam) continue;
                             *        int EntityHealth = MemoryManager.ReadMemory<int>((int)Entity + Offsets.m_iHealth);
                             *        if (EntityHealth < 1) continue;*/

                            Structs.Enemy_t entityStruct = MemoryManager.ReadMemory <Structs.Enemy_t>(Entity);

                            if (!entityStruct.Team.HasTeam() ||
                                entityStruct.Team.IsMyTeam() ||
                                !entityStruct.Health.IsAlive())
                            {
                                continue;
                            }

                            Vector3 myPos = MemoryManager.ReadMemory <Vector3>(Structs.LocalPlayer.Base + Offsets.m_vecOrigin);
                            if (myPos == Vector3.Zero)
                            {
                                continue;
                            }
                            Vector3 hisPos = MemoryManager.ReadMemory <Vector3>(Entity + Offsets.m_vecOrigin);
                            if (hisPos == Vector3.Zero)
                            {
                                continue;
                            }

                            double dist = Math.GetPlayerDistance(myPos, hisPos);
                            if (dist != 0 && dist < 15)
                            {
                                //  Console.WriteLine($"{dist}");
                                possibleTargets.Add(dist);
                            }
                        }
                        if (!possibleTargets.Any())
                        {
                            continue;
                        }

                        double distance = possibleTargets.Min();
                        if (distance <= 15 && distance > 13)
                        {
                            Console.Beep(100, 100);
                        }
                        if (distance <= 13 && distance > 10)
                        {
                            Console.Beep(200, 100);
                        }
                        if (distance <= 10 && distance > 7)
                        {
                            Console.Beep(300, 100);
                        }
                        if (distance <= 7 && distance > 5)
                        {
                            Console.Beep(400, 100);
                        }
                        if (distance <= 5 && distance > 3)
                        {
                            Console.Beep(500, 100);
                        }
                        if (distance <= 3)
                        {
                            Console.Beep(600, 100);
                        }
                    }
                }
                catch { }
            }
        }