Force session host and improve protections (#593)
* Add force session host and update protections * Remove old popgroup protection * Harden script patcher * Replace looped options with script patches * Missing break * Use enums * Forgot to break again... * Add tooltip for force session host Co-authored-by: user <email@hostname>
This commit is contained in:
@ -18,7 +18,7 @@ namespace big
|
||||
static ImColor health_red = ImColor(0.69f, 0.29f, 0.29f, 1.f);
|
||||
|
||||
void esp::draw_player(const player_ptr& plyr, ImDrawList* const draw_list) {
|
||||
if (g->esp.hide_self && plyr->is_valid() && plyr->id() == gta_util::get_network_player_mgr()->m_local_net_player->m_player_id ||
|
||||
if (g->esp.hide_self && plyr->is_valid() && plyr->id() == g_player_service->get_self()->id() ||
|
||||
!plyr->is_valid() ||
|
||||
!plyr->get_ped() ||
|
||||
!plyr->get_ped()->m_navigation) return;
|
||||
|
@ -47,5 +47,10 @@ namespace big
|
||||
|
||||
components::sub_title("Decloak");
|
||||
components::script_patch_checkbox("Reveal OTR Players", &g->session.decloak_players);
|
||||
|
||||
components::sub_title("Force Host");
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "views/view.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "util/teleport.hpp"
|
||||
#include <network/ClanData.hpp>
|
||||
|
||||
namespace big
|
||||
{
|
||||
|
@ -44,6 +44,9 @@ namespace big
|
||||
ImGui::Checkbox("Teleport To Warehouse", &g->protections.script_events.teleport_to_warehouse);
|
||||
ImGui::Checkbox("Start Activity", &g->protections.script_events.start_activity);
|
||||
components::script_patch_checkbox("Script Host Kick", &g->protections.script_host_kick);
|
||||
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::EndGroup();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user