diff --git a/memory-external/hacks/hack.hpp b/memory-external/hacks/hack.hpp index 7f83f0d..9fe3ba2 100644 --- a/memory-external/hacks/hack.hpp +++ b/memory-external/hacks/hack.hpp @@ -95,6 +95,7 @@ namespace hack { const Vector3 origin = process->read(pCSPlayerPawn + updater::offsets::m_vecOrigin); const Vector3 head = { origin.x, origin.y, origin.z + 75.f }; + const Vector3 head2 = { origin.x + 10, origin.y + 10, origin.z + 75.f }; const Vector3 localOrigin = process->read(localPlayer + updater::offsets::m_vecOrigin); if (config::render_distance != -1 && (localOrigin - origin).length2d() > config::render_distance) { @@ -108,6 +109,9 @@ namespace hack { const float height = screenPos.y - screenHead.y; const float width = height / 2.4f; + const float height2 = (screenPos.y - screenHead.y) / 8; + const float width2 = (height / 2.4f) / 4; + if (screenPos.z >= 0.01f) { const COLORREF boxColor = RGB(175, 75, 75); const COLORREF healthBarColor = RGB(255 - playerHealth, 55 + playerHealth * 2, 75); @@ -125,6 +129,10 @@ namespace hack { // Convert the floating point values to integers for RGB color creation COLORREF rainbowColor = RGB(static_cast(red), static_cast(green), static_cast(blue)); + float distance = CalculateDistance(localOrigin, origin); + // Round the distance to the nearest integer + int roundedDistance = std::round(distance / 10); + if (config::rainbow) { render::DrawBorderBox( g::hdcBuffer, @@ -160,6 +168,21 @@ namespace hack { ) ); + if (config::head_tracker) + { + if (roundedDistance > 25) + { + render::DrawFilledBox( + g::hdcBuffer, + screenHead.x - (width2 / 2), + (screenHead.y + 10 - (roundedDistance / 80)) - (height2 / 2), + width2, + height2, + rainbowColor + ); + } + } + if (config::rainbow) { render::RenderText( @@ -214,10 +237,6 @@ namespace hack { if (config::show_distance) { - float distance = CalculateDistance(localOrigin, origin); - // Round the distance to the nearest integer - int roundedDistance = std::round(distance / 10); - if (config::rainbow) { render::RenderText( @@ -240,7 +259,7 @@ namespace hack { 10 ); } - } + } } playerIndex++; }