feat(Overlay): Added indicators for options like player & vehicle god mode, infinite ammo etc. & fixed Bull Shark Testosterone Request (#1580)

* fix(CEO Abilities): Fixed request bullshark testosterone script
* feat(Overlay): Added indicators for options like player & vehicle godmode etc.
This commit is contained in:
Sixhei Tartari 2023-07-03 14:20:27 +02:00 committed by GitHub
parent 6d6848c2fb
commit 9c445be4f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 83 additions and 8 deletions

View File

@ -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;

View File

@ -112,6 +112,14 @@ namespace big
return status;
}
template<ImVec4 green = ImVec4(0.0f, 1.0f, 0.0f, 1.0f), ImVec4 red = ImVec4(1.0f, 0.0f, 0.0f, 1.0f)>
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<ImVec2 size = ImVec2(0, 0), ImVec4 color = ImVec4(0.24f, 0.23f, 0.29f, 1.00f)>
static void button(const std::string_view text, std::function<void()> cb)
{

View File

@ -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<int*>(), eVehicleFlags::TRIGGER_SPAWN_TOGGLE);
@ -94,10 +94,10 @@ namespace big::mobile
{
inline void request_bullshark_testosterone()
{
*script_global(2672505).at(3689).as<int*>() = 1;
*script_global(2672524).at(3690).as<int*>() = 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<int*>() = 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<int*>() = 1;// disable vehicle node distance check
*scr_globals::mechanic_global.at(942).as<int*>() = 1; // disable vehicle node distance check
}
*scr_globals::mechanic_global.at(928).as<int*>() = 1;// tell freemode to spawn our vehicle
*scr_globals::mechanic_global.at(988).as<int*>() = 0;// required
*scr_globals::mechanic_global.at(928).as<int*>() = 1; // tell freemode to spawn our vehicle
*scr_globals::mechanic_global.at(988).as<int*>() = 0; // required
*scr_globals::mechanic_global.at(985).as<int*>() = 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<int*>() = 0;// spawn vehicle instantly
*script_local(freemode_thread, 18630).at(176).as<int*>() = 0; // spawn vehicle instantly
// blocking call till vehicle is delivered
notify::busy_spinner("Delivering vehicle...", scr_globals::mechanic_global.at(985).as<int*>(), -1);

View File

@ -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();

View File

@ -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();
}
}
}
}