From d9b3338bf8d8a8731f53f30cc084be7f1b0e1339 Mon Sep 17 00:00:00 2001 From: IMXNOOBX Date: Sun, 22 Oct 2023 13:04:35 +0200 Subject: [PATCH] Remove weapon_ prefix from weapon name --- memory-external/hacks/hack.hpp | 36 ++++------------------------------ 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/memory-external/hacks/hack.hpp b/memory-external/hacks/hack.hpp index f36ced9..6b86a38 100644 --- a/memory-external/hacks/hack.hpp +++ b/memory-external/hacks/hack.hpp @@ -53,7 +53,7 @@ namespace hack { float roundedDistance = std::round(distance / 500.f); float height = 10 - roundedDistance; - float width = height * 1.2f; + float width = height * 1.4f; render::DrawFilledBox( g::hdcBuffer, @@ -136,6 +136,7 @@ namespace hack { char buf[32]; process->read_raw(weaponNameAddress, buf, sizeof(buf)); weaponName = std::string(buf); + weaponName = weaponName.substr(7, weaponName.length()); // Remove weapon_ prefix } const Vector3 origin = process->read(pCSPlayerPawn + updater::offsets::m_vecOrigin); @@ -278,39 +279,10 @@ namespace hack { ); } } - - /** - * Great idea by @ifBars that will be implemented later on - */ - /* - if (config::head_tracker) - { - if (roundedDistance > 35) - { - render::DrawFilledBox( - g::hdcBuffer, - screenHead.x - (head_width / 2), - (screenHead.y + 10 - (roundedDistance / 80)) - (head_height / 2), - head_width, - head_height, - (localTeam == playerTeam ? RGB(75, 175, 75) : RGB(175, 75, 75)) - ); - } - else if (roundedDistance > 5) - { - render::DrawFilledBox( - g::hdcBuffer, - screenHead.x - (head_width / 2), - screenHead.y + 25 - (head_height / 2), - head_width, - head_height, - (localTeam == playerTeam ? RGB(75, 175, 75) : RGB(175, 75, 75)) - ); - } - } - */ } } std::this_thread::sleep_for(std::chrono::milliseconds(1)); } } + +