void DoAimbot() { var player = Aimbot.GetClosestPlayer(); if (player != null && player.Distance <= 300 * 3) // TODO: FIX { var relativePoint = Aimbot.RelativePoint(Globals.LocalPlayer, player); var hitscanPos = Aimbot.GetHitscanPoint(player.Hitscan); relativePoint.X -= hitscanPos.X; relativePoint.Y -= hitscanPos.Y; if (Globals.MainForm.CheckBoxAutoShoot.Checked || (WinApi.GetAsyncKeyState(System.Windows.Forms.Keys.Space) & 0x8000) != 0) { var enemyAngle = Aimbot.PointToAngle(relativePoint); GameFuncs.OnRecoilShoot(Globals.LocalPlayer.Base, enemyAngle, 1, 0); } } }