2021-07-23 23:02:46 +02:00
|
|
|
#include "player_tabs.hpp"
|
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
|
|
|
void tab_player::tab_info()
|
|
|
|
{
|
|
|
|
if (ImGui::BeginTabItem("Info"))
|
|
|
|
{
|
|
|
|
ImGui::Checkbox("Spectate", &g.player.spectating);
|
|
|
|
|
2021-07-26 21:23:55 +02:00
|
|
|
ImGui::Separator();
|
|
|
|
|
|
|
|
ImGui::Text("Player ID: %d", g.selected_player.id);
|
|
|
|
|
2021-12-18 01:42:44 +01:00
|
|
|
|
|
|
|
if (CNetGamePlayer* net_player = g.selected_player.net_player; net_player != nullptr)
|
2021-08-05 01:26:03 +02:00
|
|
|
{
|
2021-12-18 01:42:44 +01:00
|
|
|
if (CPlayerInfo* player_info = net_player->player_info; player_info != nullptr)
|
2021-12-13 23:00:39 +01:00
|
|
|
{
|
2021-12-18 01:42:44 +01:00
|
|
|
netPlayerData& netData = player_info->m_net_player_data;
|
|
|
|
|
2021-12-13 23:00:39 +01:00
|
|
|
ImGui::Text("Session Host: %s", net_player->is_host() ? "Yes" : "No");
|
2022-01-05 18:31:09 +01:00
|
|
|
|
|
|
|
//Check if the player ped is in a vehicle
|
|
|
|
if (player_info->m_ped->m_vehicle != nullptr)
|
|
|
|
{
|
|
|
|
ImGui::Text("Car GodMode: %s", player_info->m_ped->m_vehicle->m_godmode ? "Yes" : "No");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ImGui::Text("Car GodMode: %s", "No Car Detected");
|
|
|
|
}
|
2021-07-28 00:31:59 +02:00
|
|
|
|
2021-12-18 01:42:44 +01: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-12-13 23:00:39 +01:00
|
|
|
}
|
2021-08-05 01:26:03 +02:00
|
|
|
}
|
2021-07-28 00:31:59 +02:00
|
|
|
|
2021-07-23 23:02:46 +02:00
|
|
|
ImGui::EndTabItem();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|