From 08b6744932dd31cf20384a9e3188fc06edd9a7e0 Mon Sep 17 00:00:00 2001 From: nehdexo Date: Sat, 30 Aug 2025 21:39:28 +0300 Subject: [PATCH] updated --- gui/config.hpp | 5 +++++ gui/menu.cpp | 35 ++++++++++++++++++++++++----------- hacks/esp/esp_player.cpp | 30 ++++++++++++++++++++++++------ 3 files changed, 53 insertions(+), 17 deletions(-) diff --git a/gui/config.hpp b/gui/config.hpp index 47f1494..e374e0e 100644 --- a/gui/config.hpp +++ b/gui/config.hpp @@ -42,10 +42,15 @@ struct Esp { bool box = true; bool health_bar = true; bool name = true; + + int hb_pos = 0; + const char* hb_pos_items[2] = { "Left", "Right" }; struct Flags { bool target_indicator = true; bool friend_indicator = true; + int pos = 0; + const char* pos_items[2] = { "Left", "Right" }; } flags; bool friends = true; diff --git a/gui/menu.cpp b/gui/menu.cpp index acb31ea..308bf0d 100644 --- a/gui/menu.cpp +++ b/gui/menu.cpp @@ -26,8 +26,8 @@ void draw_aim_tab() { ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); ImGui::SameLine(); - - ImGui::BeginGroup(); + ImGui::BeginChild("##AimbotMasterChild"); + //ImGui::BeginGroup(); ImGui::Checkbox("Auto Shoot", &config.aimbot.auto_shoot); @@ -49,7 +49,8 @@ void draw_aim_tab() { ImGui::Checkbox("Ignore Friends", &config.aimbot.ignore_friends); - ImGui::EndGroup(); + //ImGui::EndGroup(); + ImGui::EndChild(); } void draw_esp_tab() { @@ -64,7 +65,8 @@ void draw_esp_tab() { ImGui::SameLine(); /* ESP */ - ImGui::BeginGroup(); + //ImGui::BeginGroup(); + ImGui::BeginChild("##ESPMasterChild"); //Player ImGui::BeginGroup(); @@ -74,11 +76,15 @@ void draw_esp_tab() { ImGui::ColorEdit4("Friend Color##Player", config.esp.player.friend_color.to_arr(), ImGuiColorEditFlags_NoTooltip | ImGuiColorEditFlags_NoInputs); ImGui::Checkbox("Box##Player", &config.esp.player.box); ImGui::Checkbox("Health Bar##Player", &config.esp.player.health_bar); + ImGui::SetNextItemWidth(60.0f); + ImGui::Combo("Position##Player", &config.esp.player.hb_pos, config.esp.player.hb_pos_items, IM_ARRAYSIZE(config.esp.player.hb_pos_items)); ImGui::Checkbox("Name##Player", &config.esp.player.name); ImGui::NewLine(); ImGui::Text("Flags"); ImGui::Checkbox("Target##Player", &config.esp.player.flags.target_indicator); ImGui::Checkbox("Friend##Player", &config.esp.player.flags.friend_indicator); + ImGui::SetNextItemWidth(60.0f); + ImGui::Combo("Position##Player##Flags", &config.esp.player.flags.pos, config.esp.player.flags.pos_items, IM_ARRAYSIZE(config.esp.player.flags.pos_items)); ImGui::NewLine(); ImGui::Text("Misc"); ImGui::Checkbox("Friends##Player", &config.esp.player.friends); @@ -111,7 +117,8 @@ void draw_esp_tab() { ImGui::Checkbox("Team##Buildings", &config.esp.buildings.team); ImGui::EndGroup(); - ImGui::EndGroup(); + //ImGui::EndGroup(); + ImGui::EndChild(); } void draw_visuals_tab() { @@ -126,7 +133,8 @@ void draw_visuals_tab() { ImGui::SameLine(); /* Visuals */ - ImGui::BeginGroup(); + //ImGui::BeginGroup(); + ImGui::BeginChild("##VisualsMasterChild"); /* Removals */ //maybe make me a drop down ImGui::BeginGroup(); @@ -163,7 +171,8 @@ void draw_visuals_tab() { ImGui::SliderFloat(" ", &config.visuals.custom_fov, 30.1f, 150.0f, "%.0f\xC2\xB0"); ImGui::EndGroup(); - ImGui::EndGroup(); + //ImGui::EndGroup(); + ImGui::EndChild(); } void draw_misc_tab() { @@ -177,14 +186,16 @@ void draw_misc_tab() { ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); ImGui::SameLine(); - ImGui::BeginGroup(); + //ImGui::BeginGroup(); + ImGui::BeginChild("##MiscMasterChild"); ImGui::Text("General"); ImGui::Checkbox("Bhop", &config.misc.bhop); ImGui::Checkbox("Bypass sv_pure", &config.misc.bypasspure); ImGui::Checkbox("No Push", &config.misc.no_push); - ImGui::EndGroup(); + //ImGui::EndGroup(); + ImGui::EndChild(); } void draw_debug_tab() { @@ -198,13 +209,15 @@ void draw_debug_tab() { ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); ImGui::SameLine(); - ImGui::BeginGroup(); + //ImGui::BeginGroup(); + ImGui::BeginChild("##DebugMasterChild"); ImGui::SliderInt("Font Height", &config.debug.font_height, 6, 60); ImGui::SliderInt("Font Weight", &config.debug.font_weight, 50, 800); ImGui::Checkbox("Draw All Entities", &config.debug.debug_render_all_entities); - ImGui::EndGroup(); + //ImGui::EndGroup(); + ImGui::EndChild(); } void draw_tab(ImGuiStyle* style, const char* name, int* tab, int index) { diff --git a/hacks/esp/esp_player.cpp b/hacks/esp/esp_player.cpp index 47f9aea..721a1ee 100644 --- a/hacks/esp/esp_player.cpp +++ b/hacks/esp/esp_player.cpp @@ -33,9 +33,15 @@ void health_bar_esp_player(Vec3 screen, Vec3 screen_offset, Player* player) { //shadow surface->set_rgba(0, 0, 0, 255); - surface->draw_line(screen.x - health_offset - 5, screen.y + 1, screen.x - health_offset - 5, screen_offset.y - 2); - surface->draw_line(screen.x - health_offset - 4, screen.y + 1, screen.x - health_offset - 4, screen_offset.y - 2); - surface->draw_line(screen.x - health_offset - 3, screen.y + 1, screen.x - health_offset - 3, screen_offset.y - 2); + if (config.esp.player.hb_pos == 0) { + surface->draw_line(screen.x - health_offset - 5, screen.y + 1, screen.x - health_offset - 5, screen_offset.y - 2); + surface->draw_line(screen.x - health_offset - 4, screen.y + 1, screen.x - health_offset - 4, screen_offset.y - 2); + surface->draw_line(screen.x - health_offset - 3, screen.y + 1, screen.x - health_offset - 3, screen_offset.y - 2); + } else { + surface->draw_line(screen.x + health_offset + 5, screen.y + 1, screen.x + health_offset + 5, screen_offset.y - 2); + surface->draw_line(screen.x + health_offset + 4, screen.y + 1, screen.x + health_offset + 4, screen_offset.y - 2); + surface->draw_line(screen.x + health_offset + 3, screen.y + 1, screen.x + health_offset + 3, screen_offset.y - 2); + } surface->set_rgba(0, 255, 0, 255); int ydelta = (screen_offset.y - screen.y) * (1.f - (float(player->get_health()) / player->get_max_health())); @@ -53,7 +59,11 @@ void health_bar_esp_player(Vec3 screen, Vec3 screen_offset, Player* player) { else if (player->get_health() <= (player->get_max_health()*.35)) surface->set_rgba(255, 0, 0, 255); - surface->draw_line(screen.x - health_offset - 4, screen.y, screen.x - health_offset - 4, screen_offset.y - ydelta - 1); + if (config.esp.player.hb_pos == 0) { + surface->draw_line(screen.x - health_offset - 4, screen.y, screen.x - health_offset - 4, screen_offset.y - ydelta - 1); + } else { + surface->draw_line(screen.x + health_offset + 4, screen.y, screen.x + health_offset + 4, screen_offset.y - ydelta - 1); + } } } @@ -82,7 +92,11 @@ void flags_esp_player(Vec3 screen, Vec3 screen_offset, Player* player, unsigned if (config.esp.player.flags.target_indicator == true && player == target_player) { surface->draw_set_text_color(255, 0, 0, 255); - surface->draw_set_text_pos(screen.x + flags_x_offset + surface->get_character_width(esp_player_font, L"TARGET"[0]), screen_offset.y + flags_y_offset); + if (config.esp.player.flags.pos == 1) { + surface->draw_set_text_pos(screen.x + flags_x_offset + 1 + surface->get_character_width(esp_player_font, L"TARGET"[0]), screen_offset.y + flags_y_offset); + } else { + surface->draw_set_text_pos(screen.x - flags_x_offset - 6 - surface->get_string_width(esp_player_font, L"TARGET"), screen_offset.y + flags_y_offset); + } surface->draw_print_text(L"TARGET", wcslen(L"TARGET")); @@ -91,7 +105,11 @@ void flags_esp_player(Vec3 screen, Vec3 screen_offset, Player* player, unsigned if (config.esp.player.flags.friend_indicator == true && player->is_friend()) { surface->draw_set_text_color(0, 220, 80, 255); - surface->draw_set_text_pos(screen.x + flags_x_offset + surface->get_character_width(esp_player_font, L"FRIEND"[0]), screen_offset.y + flags_y_offset); + if (config.esp.player.flags.pos == 1) { + surface->draw_set_text_pos(screen.x + flags_x_offset + 1 + surface->get_character_width(esp_player_font, L"FRIEND"[0]), screen_offset.y + flags_y_offset); + } else { + surface->draw_set_text_pos(screen.x - flags_x_offset - 6 - surface->get_string_width(esp_player_font, L"FRIEND"), screen_offset.y + flags_y_offset); + } surface->draw_print_text(L"FRIEND", wcslen(L"FRIEND"));