TmpMenu/BigBaseV2/src/gui/window/player/player_info.cpp

44 lines
1.4 KiB
C++
Raw Normal View History

2021-07-23 23:02:46 +02:00
#include "player_tabs.hpp"
2022-01-30 00:23:26 +01:00
#include "util/misc.hpp"
2021-07-23 23:02:46 +02:00
namespace big
{
void tab_player::tab_info()
{
if (ImGui::BeginTabItem("Info"))
{
ImGui::Checkbox("Spectate", &g.player.spectating);
ImGui::Separator();
ImGui::Text("Player ID: %d", g.selected_player.id);
if (CNetGamePlayer* net_player = g.selected_player.net_player; net_player != nullptr)
{
2022-01-30 00:23:26 +01:00
if (CPlayerInfo* player_info = net_player->m_player_info; player_info != nullptr)
{
2022-01-30 00:23:26 +01:00
rage::netPlayerData& netData = player_info->m_net_player_data;
ImGui::Text("Session Host: %s", net_player->is_host() ? "Yes" : "No");
ImGui::Separator();
ImGui::Text("Wanted Level: %d", player_info->m_wanted_level);
2022-01-30 00:23:26 +01:00
ImGui::Text("Player God Mode: %s", misc::has_bit_set((int*)&player_info->m_ped->m_damage_bits, 8) ? "Yes" : "No");
ImGui::Text("Vehicle God Mode: %s",
player_info->m_ped->m_vehicle == nullptr ? "No vehicle detected" :
2022-01-30 00:23:26 +01:00
misc::has_bit_set((int*)&player_info->m_ped->m_vehicle->m_damage_bits, 8) ? "Yes" : "No"
);
ImGui::Separator();
2021-07-28 00:31:59 +02:00
ImGui::Text("Rockstar ID: %d", netData.m_rockstar_id);
ImGui::Text("IP Address: %d.%d.%d.%d:%d", netData.m_external_ip.m_field1, netData.m_external_ip.m_field2, netData.m_external_ip.m_field3, netData.m_external_ip.m_field4, netData.m_external_port);
}
}
2021-07-28 00:31:59 +02:00
2021-07-23 23:02:46 +02:00
ImGui::EndTabItem();
}
}
}