Exemple #1
0
 /// <summary>
 /// Change weapon and switch back if it is single shot sniper rifle
 /// </summary>
 public void ChangeWeaponIfScopeRifle()
 {
     foreach (int weapon in _scopeRifles)
     {
         if (weapon == GetWeaponID())
         {
             KeyboardControl.ChangeWeapon();
         }
     }
 }
Exemple #2
0
 /// <summary>
 /// Bunnyhop
 /// </summary>
 private void BunnyhopLoop()
 {
     while (_turned)
     {
         if (KeyboardControl.GetAsyncKeyState(_key) != 0 && GetPositionStatement() == 257)
         {
             KeyboardControl.keybd_event(0x20, 0x39, 0, 0);
             Thread.Sleep(20);
             KeyboardControl.keybd_event(0x20, 0x39, 0x02, 0);
         }
         else
         {
             Thread.Sleep(10);
         }
     }
 }
Exemple #3
0
        private void ReloadControlLoop()
        {
            while (_turned)
            {
                if (IsAllowedWeapon(AllowedWeapon.shotgunsList))
                {
                    int _currentWeapon = AllowedWeapon.GetWeaponID();
                    int _currentAmmo   = CheckCurrentAmmo();

                    if (_currentWeapon == _lastWeapon && _currentAmmo > _lastAmmo)
                    {
                        KeyboardControl.ChangeWeapon();
                    }
                    _lastWeapon = AllowedWeapon.GetWeaponID();
                    _lastAmmo   = CheckCurrentAmmo();
                }
                Thread.Sleep(10);
            }
        }
Exemple #4
0
        /// <summary>
        /// Detecting if any hotkey is pressed to switch functionality
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void HotkeyDetection(object sender, EventArgs e)
        {
            if (KeyboardControl.GetAsyncKeyState(_triggerbotHotkey) != 0 && !_settingHotkey)
            {
                TriggerbotSwitch();
                Thread.Sleep(200);
            }

            else if (KeyboardControl.GetAsyncKeyState(_glowHotkey) != 0 && !_settingHotkey)
            {
                GlowSwitch();
                Thread.Sleep(200);
            }

            else if (KeyboardControl.GetAsyncKeyState(_noFlashHotkey) != 0 && !_settingHotkey)
            {
                NoFlashSwitch();
                Thread.Sleep(200);
            }
        }