void Esp() { Blitzmax.SetRotation(0); Blitzmax.SetAlpha(1); Blitzmax.SetLineWidth(1); for (int i = 0; i <= 32; i++) { Blitzmax.SetColor(255, 255, 255); var player = Globals.Players[i]; if (player != null && player.Health > 0 && (player.Team != Globals.LocalPlayer.Team || Globals.MainForm.CheckboxEspTeam.Checked)) { var relativePoint = Aimbot.RelativePoint(Globals.LocalPlayer, player); var screenPos = Aimbot.ScreenPoint(relativePoint); if (Globals.MainForm.CheckboxEspHealthColor.Checked) { if (player.Health >= 70) { Blitzmax.SetColor(0, 255, 0); } else if (player.Health >= 50) { Blitzmax.SetColor(255, 255, 0); } else if (player.Health >= 20) { Blitzmax.SetColor(255, 200, 0); } else { Blitzmax.SetColor(255, 0, 0); } } if (Globals.MainForm.CheckboxEspLines.Checked) { if (player.Hitscan != HitscanResult.None) { Blitzmax.SetLineWidth(3); } Blitzmax.DrawLine(Globals.ScreenWidth / 2, Globals.ScreenHeight / 2, screenPos.X, screenPos.Y, 1); Blitzmax.SetLineWidth(1); } if (Globals.MainForm.CheckboxEspBoxes.Checked) { Blitzmax.DrawBorder((int)screenPos.X - 16, (int)screenPos.Y - 16, 32, 32); } } } }
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); } } }