Exemplo n.º 1
0
 private static void LoadSetting()
 {
     if (Local.ActiveWeapon.isPistol())
     {
         AimbotSettings = Settings.userSettings.AimbotSettings.Pistol;
     }
     else if (Local.ActiveWeapon.isRifile())
     {
         AimbotSettings = Settings.userSettings.AimbotSettings.Rifle;
     }
     else if (Local.ActiveWeapon.isSMG())
     {
         AimbotSettings = Settings.userSettings.AimbotSettings.Smg;
     }
     else if (Local.ActiveWeapon.isSniper())
     {
         AimbotSettings = Settings.userSettings.AimbotSettings.Sniper;
     }
     else if (Local.ActiveWeapon.isShotgun())
     {
         AimbotSettings = Settings.userSettings.AimbotSettings.Shotgun;
     }
     else if (Local.ActiveWeapon.isLMG())
     {
         AimbotSettings = Settings.userSettings.AimbotSettings.Lmg;
     }
 }
Exemplo n.º 2
0
        public static void Start()
        {
            gvar.SHUTDOWN++;
            while (true)
            {
                if (gvar.isShuttingDown)
                {
                    gvar.SHUTDOWN--;
                    break;
                }

                Thread.Sleep(10);

                if (gvar.isMenu)
                {
                    continue;
                }
                if (!Local.InGame)
                {
                    AimbotSettings = new Settings.UserSettings.Aimbot.ASettings();
                    continue;
                }
                if (Local.ActiveWeapon.isKnife() || Local.ActiveWeapon.isBomb() || Local.ActiveWeapon.isGrenade())
                {
                    AimbotSettings = new Settings.UserSettings.Aimbot.ASettings();
                    continue;
                }
                LoadSetting();

                if (!Local.ActiveWeapon.CanFire)
                {
                    continue;
                }

                if (!AimbotSettings.Enabled)
                {
                    Local.ViewAngle = RCS.ClampAngle();

                    Attack();
                    continue;
                }

                if (Settings.userSettings.AimbotSettings.Key == 1)
                {
                    if (AimbotSettings.SmoothPitch == 0 && AimbotSettings.SmoothYaw == 0)
                    {
                        if (!AimbotSettings.AutoShoot)
                        {
                            if (WinAPI.GetAsyncKeyState(1) <= 0 &&
                                (WinAPI.GetAsyncKeyState(1) & 0x8000) <= 0)
                            {
                                continue;
                            }
                        }
                    }
                }
                else
                {
                    if (WinAPI.GetAsyncKeyState(Settings.userSettings.AimbotSettings.Key) <= 0 &&
                        (WinAPI.GetAsyncKeyState(Settings.userSettings.AimbotSettings.Key) & 0x8000) <= 0)
                    {
                        Local.ViewAngle = RCS.ClampAngle();
                        continue;
                    }
                }
                using (Entity closestPlayer = ClosestPlayer)
                {
                    if (closestPlayer.Index == -1)
                    {
                        Local.ViewAngle = RCS.ClampAngle();

                        Attack();
                    }
                    else
                    {
                        Thread.Sleep(AimbotSettings.Delay);

                        if (AimbotSettings.SmoothPitch == 0 || AimbotSettings.SmoothYaw == 0)
                        {
                            Local.SendPackets = false;
                        }

                        oldAngle.x = (float)(Local.PunchAngle.x * (AimbotSettings.RcsYaw * 2) / 100);
                        oldAngle.y = (float)(Local.PunchAngle.y * (AimbotSettings.RcsPitch * 2) / 100);

                        Vector2 ang = CalculateAimAngle(Local.EyeLevel, closestPlayer).ClampAngle();

                        Local.ViewAngle = ang;

                        //SetSilentAngle(ang);
                        //Enable If you dare.

                        Thread.Sleep(6);

                        Local.SendPackets = true;

                        if (AimbotSettings.AutoShoot)
                        {
                            Vector2 v2 = CalculateAimAngle(Local.EyeLevel, closestPlayer, false).ClampAngle();
                            if (Math.Round(ang.x, 1) == Math.Round(v2.x, 1) && Math.Round(ang.y, 1) == Math.Round(v2.y, 1))
                            {
                                Local.Attack();
                            }
                        }
                        else
                        {
                            Vector2 v2 = CalculateAimAngle(Local.EyeLevel, closestPlayer, false).ClampAngle();
                            if (Math.Round(ang.x, 1) == Math.Round(v2.x, 1) && Math.Round(ang.y, 1) == Math.Round(v2.y, 1))
                            {
                                Attack();
                            }
                        }
                        Thread.Sleep(50);
                    }
                }
            }
        }