fix: Made breakup conditional (being host) (#1436)

Closes #1448
This commit is contained in:
DayibBaba
2023-06-17 15:49:48 +02:00
committed by GitHub
parent 4b73b46053
commit e5581a6f03
8 changed files with 79 additions and 13 deletions

View File

@ -126,9 +126,14 @@ namespace big
}
components::sub_title("Lobby Lock");
ImGui::BeginDisabled(!g_player_service->get_self()->is_host());
ImGui::Checkbox("Lock", &g.session.lock_session);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Blocks all players from joining. May not work on some modders.");
ImGui::EndDisabled();
components::sub_title("DECLOAK"_T);
components::script_patch_checkbox("REVEAL_OTR_PLAYERS"_T, &g.session.decloak_players);

View File

@ -12,9 +12,16 @@ namespace big
return gta_util::get_network()->m_game_session_ptr->is_host();
};
//components::player_command_button<"breakup">(g_player_service->get_selected());
//ImGui::SameLine();
//components::command_checkbox<"breakupcheating">();
ImGui::Text("Host/breakup kick require Host");
ImGui::BeginDisabled(!g_player_service->get_self()->is_host());
components::player_command_button<"hostkick">(g_player_service->get_selected());
components::player_command_button<"breakup">(g_player_service->get_selected());
ImGui::EndDisabled();
ImGui::SameLine();
components::command_checkbox<"breakupcheating">();
components::player_command_button<"bailkick">(g_player_service->get_selected());
ImGui::SameLine();