Files
TmpMenu/src/views/players/player/player_kick.cpp

46 lines
1.4 KiB
C++
Raw Normal View History

2022-12-06 16:12:02 +00:00
#include "util/teleport.hpp"
#include "util/toxic.hpp"
#include "views/view.hpp"
2022-12-06 16:12:02 +00:00
namespace big
{
void view::player_kick()
{
ImGui::BeginGroup();
components::sub_title("KICK"_T);
if (ImGui::BeginListBox("##kick", get_listbox_dimensions()))
2022-12-06 16:12:02 +00:00
{
auto const is_session_host = [] {
return gta_util::get_network()->m_game_session_ptr->is_host();
};
if (!g_player_service->get_self()->is_host())
ImGui::Text("VIEW_PLAYER_KICK_HOST_AND_BREAKUP_KICK_REQUIRE_SESSION_HOST"_T.data());
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">();
2023-08-12 21:45:28 +03:00
components::player_command_button<"multikick">(g_player_service->get_selected());
2024-05-06 14:11:35 -06:00
ImGui::SameLine();
components::player_command_button<"oomkick">(g_player_service->get_selected());
2024-05-06 14:11:35 -06:00
components::player_command_button<"shkick">(g_player_service->get_selected());
2024-05-06 14:11:35 -06:00
ImGui::SameLine();
components::player_command_button<"endkick">(g_player_service->get_selected());
2024-05-06 14:11:35 -06:00
components::player_command_button<"desync">(g_player_service->get_selected());
2022-12-06 16:12:02 +00:00
ImGui::EndListBox();
2022-12-06 16:12:02 +00:00
}
ImGui::EndGroup();
2022-12-06 16:12:02 +00:00
}
2024-05-06 14:11:35 -06:00
}