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