static void Main(string[] args) { Console.WriteLine("Change overlay attached window by pressing F5"); Console.WriteLine("It will attach to currently active window"); Console.WriteLine("Trackbar can be controled with mouse wheel"); System.Windows.Forms.Application.EnableVisualStyles(); System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false); input = new InputUtilities(); var hWnd = WinAPI.GetForegroundWindow(); using (SHDXOverlay = new SharpDXOverlay()) { SHDXOverlay.Attach(hWnd); SHDXOverlay.TickEvent += overlay_TickEvent; InitializeComponents(); SharpDXRenderer renderer = SHDXOverlay.Renderer; TextFormat smallFont = renderer.CreateFont("smallFont", "Century Gothic", 10f); TextFormat largeFont = renderer.CreateFont("largeFont", "Century Gothic", 14f); TextFormat heavyFont = renderer.CreateFont("heavyFont", "Century Gothic", 14f, SharpDX.DirectWrite.FontStyle.Normal, FontWeight.Heavy); windowMenu.Font = smallFont; windowMenu.Caption.Font = largeFont; SHDXOverlay.ChildControls.Add(windowMenu); System.Windows.Forms.Application.Run(SHDXOverlay); } }
public static void Main(string[] args) { System.Windows.Forms.Application.EnableVisualStyles(); System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false); PrintSuccess("[>]=-- Zat's CSGO-ESP"); PrintEncolored("[www.unknowncheats.me - Leading the game hacking scene since 2000]", ConsoleColor.Cyan); Thread scroller = new Thread(new ThreadStart(LoopScroll)); scroller.IsBackground = true; scroller.Start(); KeyUtils = new KeyUtils(); ConfigUtils = new CSGOConfigUtils(); //ESP ConfigUtils.BooleanSettings.AddRange(new string[] { "espEnabled", "espBox", "espSkeleton", "espName", "espHealth", "espAllies", "espEnemies" }); //Aim ConfigUtils.BooleanSettings.AddRange(new string[] { "aimDrawFov", "aimEnabled", "aimToggle", "aimHold", "aimSmoothEnabled", "aimFilterSpotted", "aimFilterSpottedBy", "aimFilterEnemies", "aimFilterAllies", "aimFilterSpottedBy" }); ConfigUtils.KeySettings.Add("aimKey"); ConfigUtils.FloatSettings.AddRange(new string[] { "aimFov", "aimSmoothValue" }); ConfigUtils.IntegerSettings.Add("aimBone"); //RCS ConfigUtils.BooleanSettings.Add("rcsEnabled"); ConfigUtils.FloatSettings.Add("rcsForce"); //Trigger ConfigUtils.BooleanSettings.AddRange(new string[] { "triggerEnabled", "triggerToggle", "triggerHold", "triggerFilterEnemies", "triggerFilterAllies", "triggerBurstEnabled", "triggerBurstRandomize" }); ConfigUtils.KeySettings.Add("triggerKey"); ConfigUtils.FloatSettings.AddRange(new string[] { "triggerDelayFirstShot", "triggerDelayShots", "triggerBurstShots" }); //Radar ConfigUtils.BooleanSettings.AddRange(new string[] { "radarEnabled", "radarAllies", "radarEnemies" }); ConfigUtils.FloatSettings.AddRange(new string[] { "radarScale", "radarWidth", "radarHeight" }); //Crosshair ConfigUtils.BooleanSettings.AddRange(new string[] { "crosshairEnabled", "crosshairOutline" }); ConfigUtils.IntegerSettings.AddRange(new string[] { "crosshairType" }); ConfigUtils.UIntegerSettings.AddRange(new string[] { "crosshairPrimaryColor", "crosshairSecondaryColor" }); ConfigUtils.FloatSettings.AddRange(new string[] { "crosshairWidth", "crosshairSpreadScale", "crosshairRadius" }); //Windows ConfigUtils.BooleanSettings.AddRange(new string[] { "windowSpectatorsEnabled", "windowPerformanceEnabled", "windowBotsEnabled", "windowEnemiesEnabled" }); ConfigUtils.FillDefaultValues(); if (!File.Exists("euc_csgo.cfg")) { ConfigUtils.SaveSettingsToFile("euc_csgo.cfg"); } ConfigUtils.ReadSettingsFromFile("euc_csgo.cfg"); PrintInfo("> Waiting for CSGO to start up..."); while (!ProcUtils.ProcessIsRunning(GAME_PROCESS)) { Thread.Sleep(250); } ProcUtils = new ProcUtils(GAME_PROCESS, WinAPI.ProcessAccessFlags.VirtualMemoryRead | WinAPI.ProcessAccessFlags.VirtualMemoryWrite | WinAPI.ProcessAccessFlags.VirtualMemoryOperation); MemUtils = new ExternalUtilsCSharp.MemUtils(); MemUtils.Handle = ProcUtils.Handle; PrintInfo("> Waiting for CSGOs window to show up..."); while ((hWnd = WinAPI.FindWindowByCaption(hWnd, GAME_TITLE)) == IntPtr.Zero) { Thread.Sleep(250); } ProcessModule clientDll, engineDll; PrintInfo("> Waiting for CSGO to load client.dll..."); while ((clientDll = ProcUtils.GetModuleByName(@"bin\client.dll")) == null) { Thread.Sleep(250); } PrintInfo("> Waiting for CSGO to load engine.dll..."); while ((engineDll = ProcUtils.GetModuleByName(@"engine.dll")) == null) { Thread.Sleep(250); } Framework = new Framework(clientDll, engineDll); PrintInfo("> Initializing overlay"); using (SHDXOverlay = new SharpDXOverlay()) { SHDXOverlay.Attach(hWnd); SHDXOverlay.TickEvent += overlay_TickEvent; SHDXOverlay.BeforeDrawingEvent += SHDXOverlay_BeforeDrawingEvent; InitializeComponents(); SharpDXRenderer renderer = SHDXOverlay.Renderer; TextFormat smallFont = renderer.CreateFont("smallFont", "Century Gothic", 10f); TextFormat largeFont = renderer.CreateFont("largeFont", "Century Gothic", 14f); TextFormat heavyFont = renderer.CreateFont("heavyFont", "Century Gothic", 14f, FontStyle.Normal, FontWeight.Heavy); windowMenu.Font = smallFont; windowMenu.Caption.Font = largeFont; windowGraphs.Font = smallFont; windowGraphs.Caption.Font = largeFont; windowSpectators.Font = smallFont; windowSpectators.Caption.Font = largeFont; windowBots.Font = smallFont; windowBots.Caption.Font = largeFont; graphMemRead.Font = smallFont; graphMemWrite.Font = smallFont; for (int i = 0; i < ctrlPlayerESP.Length; i++) { ctrlPlayerESP[i].Font = heavyFont; SHDXOverlay.ChildControls.Add(ctrlPlayerESP[i]); } ctrlRadar.Font = smallFont; windowMenu.ApplySettings(ConfigUtils); SHDXOverlay.ChildControls.Add(ctrlCrosshair); SHDXOverlay.ChildControls.Add(ctrlRadar); SHDXOverlay.ChildControls.Add(windowMenu); SHDXOverlay.ChildControls.Add(windowGraphs); SHDXOverlay.ChildControls.Add(windowSpectators); SHDXOverlay.ChildControls.Add(windowBots); SHDXOverlay.ChildControls.Add(cursor); PrintInfo("> Running overlay"); System.Windows.Forms.Application.Run(SHDXOverlay); } ConfigUtils.SaveSettingsToFile("euc_csgo.cfg"); }