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); } } } }
/// <summary> /// Called after dll has been injected /// </summary> public Core() { DebugHelper.ShowConsoleWindow(); CurrentProcess = Process.GetCurrentProcess(); Globals.Players = new Player[33]; GameFuncs.Init(); Blitzmax.Init(); Patches.Init(); ReadSignatures(); InitHooks(); }