mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-07 18:03:34 +08:00
chore(Classes): Modified code to reflect changes made in GTAV-Classes vendor
This commit is contained in:
parent
82686abba4
commit
f2011a6ce5
@ -51,9 +51,11 @@ namespace big::api
|
||||
http::Request request(domain + path);
|
||||
|
||||
CPlayerInfo* player_info = g_local_player->m_player_info;
|
||||
netPlayerData& netData = player_info->m_net_player_data;
|
||||
|
||||
nlohmann::json body = {
|
||||
{ "username", std::string(player_info->m_name) },
|
||||
{ "rockstar_id", player_info->m_rockstar_id2 }
|
||||
{ "username", std::string(netData.m_name) },
|
||||
{ "rockstar_id", netData.m_rockstar_id }
|
||||
};
|
||||
|
||||
try
|
||||
|
@ -8,40 +8,38 @@
|
||||
#pragma pack(push, 1)
|
||||
namespace rage
|
||||
{
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable : 4201) // nonstandard extension used: nameless struct/union
|
||||
union netAddress
|
||||
class netAddress
|
||||
{
|
||||
std::uint32_t m_raw;
|
||||
struct
|
||||
{
|
||||
std::uint8_t m_field4;
|
||||
std::uint8_t m_field3;
|
||||
std::uint8_t m_field2;
|
||||
std::uint8_t m_field1;
|
||||
};
|
||||
};
|
||||
# pragma warning(pop)
|
||||
public:
|
||||
uint8_t m_field4; //0x0000
|
||||
uint8_t m_field3; //0x0001
|
||||
uint8_t m_field2; //0x0002
|
||||
uint8_t m_field1; //0x0003
|
||||
}; //Size: 0x0004
|
||||
static_assert(sizeof(netAddress) == 0x4);
|
||||
|
||||
class netPlayerData
|
||||
{
|
||||
public:
|
||||
char pad_0000[48]; //0x0000
|
||||
uint32_t m_sec_key_time; //0x0010
|
||||
netAddress m_lan_ip; //0x0014
|
||||
uint16_t m_lan_port; //0x0018
|
||||
char pad_001A[2]; //0x001A
|
||||
netAddress m_relay_ip; //0x001C
|
||||
uint32_t m_relay_port; //0x0020
|
||||
netAddress m_online_ip; //0x0024
|
||||
uint16_t m_online_port; //0x0028
|
||||
char pad_002A[22]; //0x002A
|
||||
int32_t m_host_token; //0x0040
|
||||
char pad_0044[12]; //0x0044
|
||||
uint64_t m_rockstar_id; //0x0050
|
||||
char pad_0058[12]; //0x0058
|
||||
char m_name[20]; //0x0064
|
||||
}; //Size: 0x0078
|
||||
char pad_0000[8]; //0x0000
|
||||
uint64_t m_rockstar_id; //0x0008
|
||||
char pad_0010[52]; //0x0010
|
||||
class netAddress m_relay_ip; //0x0044
|
||||
uint16_t m_relay_port; //0x0048
|
||||
char pad_004A[2]; //0x004A
|
||||
class netAddress m_external_ip; //0x004C
|
||||
uint16_t m_external_port; //0x0050
|
||||
char pad_0052[2]; //0x0052
|
||||
class netAddress m_internal_ip; //0x0054
|
||||
uint16_t m_internal_port; //0x0058
|
||||
char pad_005A[6]; //0x005A
|
||||
uint64_t m_host_token; //0x0060
|
||||
char pad_0068[8]; //0x0068
|
||||
uint64_t m_rockstar_id2; //0x0070
|
||||
char pad_0078[12]; //0x0078
|
||||
char m_name[20]; //0x0084
|
||||
}; //Size: 0x0098
|
||||
static_assert(sizeof(netPlayerData) == 0x98);
|
||||
|
||||
class nonPhysicalPlayerDataBase
|
||||
{
|
||||
|
@ -12,16 +12,17 @@ namespace big
|
||||
|
||||
ImGui::Text("Player ID: %d", g.selected_player.id);
|
||||
|
||||
CNetGamePlayer* net_player = g.selected_player.net_player;
|
||||
if (net_player != nullptr)
|
||||
|
||||
if (CNetGamePlayer* net_player = g.selected_player.net_player; net_player != nullptr)
|
||||
{
|
||||
CPlayerInfo* player_info = net_player->player_info;
|
||||
if (player_info != nullptr)
|
||||
if (CPlayerInfo* player_info = net_player->player_info; player_info != nullptr)
|
||||
{
|
||||
netPlayerData& netData = player_info->m_net_player_data;
|
||||
|
||||
ImGui::Text("Session Host: %s", net_player->is_host() ? "Yes" : "No");
|
||||
|
||||
ImGui::Text("Rockstar ID: %d", player_info->m_rockstar_id);
|
||||
ImGui::Text("IP Address: %d.%d.%d.%d:%d", player_info->m_external_ip.m_field1, player_info->m_external_ip.m_field2, player_info->m_external_ip.m_field3, player_info->m_external_ip.m_field4, player_info->m_external_port);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ namespace big
|
||||
if (ImGui::BeginMenu("Info"))
|
||||
{
|
||||
ImGui::MenuItem("Logged in as:", NULL, false, false);
|
||||
ImGui::MenuItem(g_local_player == nullptr || g_local_player->m_player_info == nullptr ? "unknown" : g_local_player->m_player_info->m_name, NULL, false, false);
|
||||
ImGui::MenuItem(g_local_player == nullptr || g_local_player->m_player_info == nullptr ? "unknown" : g_local_player->m_player_info->m_net_player_data.m_name, NULL, false, false);
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user