diff --git a/src/core/settings.hpp b/src/core/settings.hpp index bdc08797..16eb33c8 100644 --- a/src/core/settings.hpp +++ b/src/core/settings.hpp @@ -748,15 +748,30 @@ namespace big bool show_with_menu_opened = false; bool show_fps = true; + bool show_indicators = true; bool show_players = true; bool show_time = true; bool show_replay_interface = true; bool show_position = false; bool show_game_versions = true; - NLOHMANN_DEFINE_TYPE_INTRUSIVE(ingame_overlay, opened, show_with_menu_opened, show_fps, show_players, show_time, show_replay_interface, show_position, show_game_versions) + NLOHMANN_DEFINE_TYPE_INTRUSIVE(ingame_overlay, opened, show_with_menu_opened, show_fps, show_indicators, show_players, show_time, show_replay_interface, show_position, show_game_versions) } ingame_overlay{}; + struct ingame_overlay_indicators + { + bool show_player_godmode = true; + bool show_off_radar = true; + bool show_vehicle_godmode = true; + bool show_never_wanted = true; + bool show_infinite_ammo = false; + bool show_infinite_mag = false; + bool show_aimbot = false; + bool show_triggerbot = false; + + NLOHMANN_DEFINE_TYPE_INTRUSIVE(ingame_overlay_indicators, show_player_godmode, show_off_radar, show_vehicle_godmode, show_never_wanted, show_infinite_ammo, show_infinite_mag, show_aimbot, show_triggerbot) + } ingame_overlay_indicators{}; + struct vehicle_control { bool opened = false; diff --git a/src/gui/components/components.hpp b/src/gui/components/components.hpp index ff73dd4f..46b7bc90 100644 --- a/src/gui/components/components.hpp +++ b/src/gui/components/components.hpp @@ -112,6 +112,14 @@ namespace big return status; } + template + static void overlay_indicator(const std::string_view text, bool value) + { + ImGui::Text(std::format("{}: ", text).data()); + ImGui::SameLine(); + ImGui::TextColored(value ? green : red, value ? "Enabled" : "Disabled"); + } + template static void button(const std::string_view text, std::function cb) { diff --git a/src/util/mobile.hpp b/src/util/mobile.hpp index 62d84069..df305a66 100644 --- a/src/util/mobile.hpp +++ b/src/util/mobile.hpp @@ -17,7 +17,7 @@ namespace big::mobile namespace util { - int get_current_personal_vehicle();// forward declare + int get_current_personal_vehicle(); // forward declare inline void despawn_current_personal_vehicle() { misc::clear_bits(scr_globals::vehicle_global.at(get_current_personal_vehicle(), 142).at(103).as(), eVehicleFlags::TRIGGER_SPAWN_TOGGLE); @@ -94,10 +94,10 @@ namespace big::mobile { inline void request_bullshark_testosterone() { - *script_global(2672505).at(3689).as() = 1; + *script_global(2672524).at(3690).as() = 1; } - inline void request_ballistic_armor()//i think this is a ceo ability atleast? + inline void request_ballistic_armor() //i think this is a ceo ability atleast? { *script_global(scr_globals::mechanic_global).at(896).as() = 1; } @@ -127,17 +127,17 @@ namespace big::mobile // only do this when spawn inside is enabled otherwise the vehicle will spawn relatively far away from players if (g.clone_pv.spawn_inside) { - *scr_globals::mechanic_global.at(942).as() = 1;// disable vehicle node distance check + *scr_globals::mechanic_global.at(942).as() = 1; // disable vehicle node distance check } - *scr_globals::mechanic_global.at(928).as() = 1;// tell freemode to spawn our vehicle - *scr_globals::mechanic_global.at(988).as() = 0;// required + *scr_globals::mechanic_global.at(928).as() = 1; // tell freemode to spawn our vehicle + *scr_globals::mechanic_global.at(988).as() = 0; // required *scr_globals::mechanic_global.at(985).as() = veh_idx; script::get_current()->yield(100ms); GtaThread* freemode_thread = gta_util::find_script_thread(RAGE_JOAAT("freemode")); if (freemode_thread) - *script_local(freemode_thread, 18630).at(176).as() = 0;// spawn vehicle instantly + *script_local(freemode_thread, 18630).at(176).as() = 0; // spawn vehicle instantly // blocking call till vehicle is delivered notify::busy_spinner("Delivering vehicle...", scr_globals::mechanic_global.at(985).as(), -1); diff --git a/src/views/core/view_overlay.cpp b/src/views/core/view_overlay.cpp index a7805d8e..932d4e13 100644 --- a/src/views/core/view_overlay.cpp +++ b/src/views/core/view_overlay.cpp @@ -28,6 +28,35 @@ namespace big ImGui::Text(std::format("Players: {}/{}", network_player_mgr->m_player_count, network_player_mgr->m_player_limit) .c_str()); + if (g.window.ingame_overlay.show_indicators) + { + ImGui::Separator(); + + if (g.window.ingame_overlay_indicators.show_player_godmode) + components::overlay_indicator("Player Godmode", g.self.god_mode); + + if (g.window.ingame_overlay_indicators.show_off_radar) + components::overlay_indicator("Off Radar", g.self.off_radar); + + if (g.window.ingame_overlay_indicators.show_vehicle_godmode) + components::overlay_indicator("Vehicle Godmode", g.vehicle.god_mode); + + if (g.window.ingame_overlay_indicators.show_never_wanted) + components::overlay_indicator("Never Wanted", g.self.never_wanted); + + if (g.window.ingame_overlay_indicators.show_infinite_ammo) + components::overlay_indicator("Infinite Ammo", g.weapons.infinite_ammo); + + if (g.window.ingame_overlay_indicators.show_infinite_mag) + components::overlay_indicator("Infinite Magazine", g.weapons.infinite_mag); + + if (g.window.ingame_overlay_indicators.show_aimbot) + components::overlay_indicator("Aimbot", g.weapons.aimbot.enable); + + if (g.window.ingame_overlay_indicators.show_triggerbot) + components::overlay_indicator("Triggerbot", g.weapons.triggerbot); + } + if (g.window.ingame_overlay.show_position && g_local_player) { ImGui::Separator(); diff --git a/src/views/settings/view_gui_settings.cpp b/src/views/settings/view_gui_settings.cpp index 3f096d55..191b06d8 100644 --- a/src/views/settings/view_gui_settings.cpp +++ b/src/views/settings/view_gui_settings.cpp @@ -47,6 +47,7 @@ namespace big ImGui::Checkbox("Show Time", &g.window.ingame_overlay.show_time); if (ImGui::IsItemHovered()) ImGui::SetTooltip("Show time is currently disabled as it caused problems for some users."); + ImGui::Checkbox("Show Indicators", &g.window.ingame_overlay.show_indicators); ImGui::EndGroup(); ImGui::SameLine(); @@ -57,6 +58,28 @@ namespace big ImGui::Checkbox("Show Game Version", &g.window.ingame_overlay.show_game_versions); ImGui::EndGroup(); + + if (g.window.ingame_overlay.show_indicators) + { + if (ImGui::TreeNode("Overlay Indicators")) + { + ImGui::BeginGroup(); + ImGui::Checkbox("Show Player Godmode", &g.window.ingame_overlay_indicators.show_player_godmode); + ImGui::Checkbox("Show Off Radar", &g.window.ingame_overlay_indicators.show_off_radar); + ImGui::Checkbox("Show Vehicle Godmode", &g.window.ingame_overlay_indicators.show_vehicle_godmode); + ImGui::Checkbox("Show Never Wanted", &g.window.ingame_overlay_indicators.show_never_wanted); + ImGui::EndGroup(); + ImGui::SameLine(); + ImGui::BeginGroup(); + ImGui::Checkbox("Show Infinite Ammo", &g.window.ingame_overlay_indicators.show_infinite_ammo); + ImGui::Checkbox("Show Infinite Magazine", &g.window.ingame_overlay_indicators.show_infinite_mag); + ImGui::Checkbox("Show Aimbot", &g.window.ingame_overlay_indicators.show_aimbot); + ImGui::Checkbox("Show Triggerbot", &g.window.ingame_overlay_indicators.show_triggerbot); + ImGui::EndGroup(); + + ImGui::TreePop(); + } + } } } \ No newline at end of file