Exemplo n.º 1
0
        public override void DoWork()
        {
            while (Global.LocalPlayer == null)
            {
                Thread.Sleep(500);
            }

            Global.LocalPlayer.AfterShotFire += (sender, args) =>
            {
                Global.LocalPlayer.SendPackets = false;
                Global.LocalPlayer.ViewAngle   = RCS.NewViewAngle().NormalizeAngle();
                Thread.Sleep(10);
                Global.LocalPlayer.SendPackets = true;
            };

            while (true)
            {
                if (!Enabled || Global.ProcessState != ProcessState.Attached || Global.LocalPlayer == null)
                {
                    Thread.Sleep(1000);
                    continue;
                }


                if (Key == 0 || Keyboard.IsPressed(Key))
                {
                    if (CanShoot())
                    {
                        TriggerPattern();
                    }
                }

                ThreadSleep.Set(FunctionName);
            }
        }
Exemplo n.º 2
0
        public override void DoWork()
        {
            while (true)
            {
                if (Global.LocalPlayer == null || Global.ProcessState != ProcessState.Attached || !Enabled)
                {
                    Thread.Sleep(1000);
                    continue;
                }

                if (Keyboard.IsPressed(1))
                {
                    var lPlayer = Global.LocalPlayer;
                    var wpn     = lPlayer.Inventory.ActiveWeapon.TypeOfWeapon();
                    if (wpn != WeaponType.Pistol && lPlayer.Inventory.ActiveWeapon.Name != "AWP" &&
                        wpn != WeaponType.Knife && wpn != WeaponType.Shotgun)
                    {
                        if (lPlayer.ShotsFired >= 1)
                        {
                            lPlayer.ViewAngle = RCS.NewViewAngle().NormalizeAngle();
                        }
                        _reset = true;
                    }
                }
                else if (_reset)
                {
                    _reset = false;
                    RCS.HardReset();
                }

                ThreadSleep.Set(FunctionName);
            }
        }