Lessen breakup kicks and more (#625)

This commit is contained in:
maybegreat48
2022-11-21 15:42:12 +00:00
committed by GitHub
parent abad615531
commit 64b47779e8
46 changed files with 1109 additions and 146 deletions

View File

@ -4,6 +4,7 @@
#include "core/data/region_codes.hpp"
#include "gta_util.hpp"
#include "util/notify.hpp"
#include "util/scripts.hpp"
namespace big
{
@ -74,5 +75,55 @@ namespace big
ImGui::Checkbox("Force Session Host", &g->session.force_session_host);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Join another session to apply changes. The original host of the session must leave or be kicked. This feature is easily detectable by other mod menus, use with caution");
components::sub_title("Remote Name Spoofing");
ImGui::Checkbox("Spoof Other Players' Names", &g->session.name_spoof_enabled);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Requires session host. Spoofed names will not visible locally nor to the player that had their name spoofed. Requires players to join after becoming host");
if (g->session.name_spoof_enabled)
{
ImGui::Checkbox("Advertise YimMenu", &g->session.advertise_menu);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Advertise YimMenu by spoofing player names to differently colored variants of 'YimMenu'. You will not be able to customize the name with this option enabled");
if (!g->session.advertise_menu)
{
constexpr size_t name_size = RTL_FIELD_SIZE(rage::rlGamerInfo, m_name);
static char name[name_size];
strcpy_s(name, sizeof(name), g->session.spoofed_name.c_str());
ImGui::Text("Name: ");
ImGui::InputText("##username_input", name, sizeof(name));
if (name != g->session.spoofed_name)
g->session.spoofed_name = std::string(name);
}
}
components::sub_title("All Players");
ImGui::Checkbox("Off The Radar", &g->session.off_radar_all);
ImGui::Checkbox("Never Wanted", &g->session.never_wanted_all);
ImGui::Checkbox("Semi Godmode", &g->session.semi_godmode_all);
components::sub_title("Event Starter");
ImGui::BeginGroup();
components::button("Hot Target", [] { scripts::start_launcher_script(36); });
components::button("Kill List", [] { scripts::start_launcher_script(37); });
components::button("Checkpoints", [] { scripts::start_launcher_script(39); });
components::button("Challenges", [] { scripts::start_launcher_script(40); });
components::button("Penned In", [] { scripts::start_launcher_script(41); });
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
components::button("Hot Property", [] { scripts::start_launcher_script(43); });
components::button("King Of The Castle", [] { scripts::start_launcher_script(45); });
components::button("Criminal Damage", [] { scripts::start_launcher_script(46); });
components::button("Hunt The Beast", [] { scripts::start_launcher_script(47); });
components::button("Business Battles", [] { scripts::start_launcher_script(114); });
ImGui::EndGroup();
}
}

View File

@ -7,6 +7,7 @@
#include "util/ped.hpp"
#include "util/teleport.hpp"
#include "views/view.hpp"
#include "util/vehicle.hpp"
namespace big
{
@ -108,6 +109,11 @@ namespace big
if (auto net_player_data = g_player_service->get_selected()->get_net_data(); net_player_data != nullptr)
{
ImGui::Text("Rockstar ID: %d", net_player_data->m_gamer_handle_2.m_rockstar_id);
ImGui::SameLine();
if (ImGui::Button("Copy")) ImGui::SetClipboardText(std::to_string(net_player_data->m_gamer_handle_2.m_rockstar_id).data());
ImGui::Text(
"IP Address: %d.%d.%d.%d:%d",
net_player_data->m_external_ip.m_field1,
@ -116,6 +122,14 @@ namespace big
net_player_data->m_external_ip.m_field4,
net_player_data->m_external_port
);
ImGui::SameLine();
if (ImGui::Button("Copy")) ImGui::SetClipboardText(std::format("{}.{}.{}.{}:{}", net_player_data->m_external_ip.m_field1,
net_player_data->m_external_ip.m_field2,
net_player_data->m_external_ip.m_field3,
net_player_data->m_external_ip.m_field4,
net_player_data->m_external_port).data());
}
if (ImGui::Button("Add To Database"))
@ -149,6 +163,12 @@ namespace big
if (ImGui::TreeNode("Misc"))
{
components::button("Join CEO/MC", []
{
*scr_globals::gpbd_fm_3.at(self::id, scr_globals::size::gpbd_fm_3).at(10).as<int*>() = g_player_service->get_selected()->id();
*scr_globals::gpbd_fm_3.at(self::id, scr_globals::size::gpbd_fm_3).at(10).at(26).as<int*>() = g_player_service->get_selected()->id();
});
components::button("Steal Outfit", []
{
ped::steal_outfit(
@ -172,8 +192,6 @@ namespace big
ImGui::SameLine();
ImGui::Checkbox("Never Wanted", &g_player_service->get_selected()->never_wanted);
components::button("Give Health", []
{
g_pickup_service->give_player_health(g_player_service->get_selected()->id());
@ -198,6 +216,26 @@ namespace big
g_pickup_service->give_player_weapons(g_player_service->get_selected()->id());
});
ImGui::Checkbox("Off The Radar", &g_player_service->get_selected()->off_radar);
ImGui::Checkbox("Never Wanted", &g_player_service->get_selected()->never_wanted);
ImGui::Checkbox("Semi Godmode", &g_player_service->get_selected()->semi_godmode);
components::button("Remote Control Vehicle", []
{
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player_service->get_selected()->id()), FALSE);
if (veh == 0)
{
if (g->player.spectating)
g_notification_service->push_warning("Remote Control", "Player not in a vehicle");
else
g_notification_service->push_warning("Remote Control", "Player not in a vehicle, try spectating the player");
return;
}
vehicle::remote_control_vehicle(veh);
g->player.spectating = false;
});
ImGui::TreePop();
}
}

View File

@ -47,6 +47,9 @@ namespace big
ImGui::Checkbox("RID Join", &g->protections.rid_join);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("This will block anyone trying to join you through Rockstar ID, including your friends");
ImGui::Checkbox("Lessen Breakup Kicks As Host", &g->protections.lessen_breakups);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Attacker must join after you have become host for this to work. There are anti-cheat concerns with this feature");
ImGui::EndGroup();
}