public void SDXThread(object sender) { float progress = 0.0f; while (IsRunning) { GameHandle = GameProcess.MainWindowHandle; if (GameProcess.HasExited) { IsRunning = false; } // get the coords of the csgo window GetWindowRect(GameHandle, out WindowBounds); // set the location of the form overlay try { if (WindowBounds.X != Location.X || WindowBounds.Width != Size.Width) { Location = new System.Drawing.Point(WindowBounds.X, WindowBounds.Y); Size = new System.Drawing.Size(WindowBounds.Width, WindowBounds.Height); } } catch { } // set the size of the form overlay WindowSize = new Size2(WindowBounds.Width, WindowBounds.Height); RenderDevice.BeginDraw(); RenderDevice.Clear(Color.Transparent); RenderDevice.TextAntialiasMode = TextAntialiasMode.Aliased; // you can set another text mode //place your rendering things here if (GetActiveWindowTitle() == "Counter-Strike: Global Offensive" || GetActiveWindowTitle() == "Dolphin") { Mem.StartProcess(); // Create Local Entity LocalEntity LE = new LocalEntity(); // update viewmatrix ViewMatrix = Matrix4x4.ReadMatrix(Mem, dwClient + dwViewMatrix); // Update radar image (in case of map change) if (RadarEnabled) { RadarImageUpdate(); } // perform this loop for every entity in the game for (int i = 0; i < 32; i++) { // increment rainbow cycle colour progress += 0.00001f; // create new entity instance Entity Entity = new Entity(i); // Call Radar if enabled on GUI if (RadarEnabled) { RadarLoop(Entity, LE); } // Call ESP if enabled on GUI if (BoxESPEnabledFriendly || BoxESPEnabledOpposition || SkeletonsEnabledFriendly || SkeletonsEnabledOpposition) { ESPLoop(Entity, LE, progress); } // Draw HP Label if enabled on GUI if (IsEnabled_EnemyHPLabel && Entity.Entity_Team != LE.LocalEntity_Team && Entity.Entity_isAlive()) { Drawing2D.DrawShadowText(Entity.Entity_Position_W2S.X - 20, Entity.Entity_Position_W2S.Y, 12.0f, Color.Lime, ("《 ❤ " + Entity.Entity_Health + " 》")); } // Draw Glow if enabled on GUI if (GlowEnabledOpposition || GlowEnabledFriendly) { DoGlow(Mem, Entity, LE, progress); } // Call trigger if enabled on GUI if (IsEnabled_TriggerBot) { TriggerbotLoop(LE); } } Thread.Sleep(1); } RenderDevice.EndDraw(); } }