More fixes for 1.66 (#944)

* fix(Menu): more update fixes
* fix(Spoofing): remove spoofing
* fix(Globals): update globals
* fix(Classes): upstream classes
* fix(Misc): remove debug code
* fix(Merge)
This commit is contained in:
maybegreat48 2023-02-04 16:35:18 +00:00 committed by GitHub
parent c75a17256e
commit 846162b911
27 changed files with 139 additions and 251 deletions

View File

@ -3,7 +3,7 @@ include(FetchContent)
FetchContent_Declare(
gtav_classes
GIT_REPOSITORY https://github.com/Yimura/GTAV-Classes.git
GIT_TAG f155790d38c131f4df0933283a577423e0ddd2da
GIT_TAG 4f93aec221704c74daefab2362b88429ac2dc6bc
GIT_PROGRESS TRUE
CONFIGURE_COMMAND ""
BUILD_COMMAND ""

View File

@ -1,47 +0,0 @@
#include "backend/player_command.hpp"
#include "natives.hpp"
#include "pointers.hpp"
#include "core/scr_globals.hpp"
#include "packet.hpp"
#include "gta_util.hpp"
#include <network/Network.hpp>
namespace big
{
class gamer_instruction_kick : player_command
{
using player_command::player_command;
void gamer_handle_serialize(rage::rlGamerHandle& hnd, rage::datBitBuffer& buf)
{
buf.Write<uint8_t>(*reinterpret_cast<uint8_t*>(&hnd.m_platform), 8);
if (*reinterpret_cast<uint8_t*>(&hnd.m_platform) == 3)
{
buf.WriteInt64(*(int64_t*)&hnd.m_rockstar_id, 64);
buf.Write<uint8_t>(*reinterpret_cast<uint8_t*>(reinterpret_cast<__int64>(&hnd) + 9), 8);
}
}
virtual CommandAccessLevel get_access_level()
{
return CommandAccessLevel::TOXIC;
}
virtual void execute(player_ptr player, const std::vector<std::uint64_t>& _args, const std::shared_ptr<command_context> ctx)
{
packet msg;
msg.write_message(rage::eNetMessage::MsgTransitionGamerInstruction);
gamer_handle_serialize(g_player_service->get_selected()->get_net_data()->m_gamer_handle_2, msg.m_buffer); // src
gamer_handle_serialize(g_player_service->get_selected()->get_net_data()->m_gamer_handle_2, msg.m_buffer); // target
msg.write<bool>(false, 1); // string extend
msg.write<int>(0, 7); // string length
msg.write<int>(8, 32); // instruction type
msg.write<int>(0, 32);
msg.write<int>(0, 32);
msg.send(g_player_service->get_selected(), gta_util::get_network()->m_transition_session.m_connection_identifier);
}
};
gamer_instruction_kick g_gamer_instruction_kick("gikick", "Gamer Instruction Kick", "This is unlikely to kick menus that block NETWORK_BAIL", 0);
}

View File

@ -19,7 +19,7 @@ namespace big
if (*reinterpret_cast<uint8_t*>(&hnd.m_platform) == 3)
{
buf.WriteInt64(*(int64_t*)&hnd.m_rockstar_id, 64);
buf.Write<uint8_t>(*reinterpret_cast<uint8_t*>(reinterpret_cast<__int64>(&hnd) + 9), 8);
buf.Write<uint8_t>(hnd.unk_0009, 8);
}
}
@ -39,12 +39,12 @@ namespace big
packet msg{};
msg.write_message(rage::eNetMessage::MsgLostConnectionToHost);
msg.write<uint64_t>(gta_util::get_network()->m_game_session_ptr->m_rline_session.m_session_id, 64);
gamer_handle_serialize((*(rage::rlGamerHandle*)(&player->get_net_data()->m_gamer_handle_2.m_rockstar_id)), msg);
gamer_handle_serialize(player->get_net_data()->m_gamer_handle, msg);
for (auto& [_, plyr] : g_player_service->players())
{
if (plyr->is_host())
{
msg.send(plyr, gta_util::get_network()->m_game_session_ptr->m_connection_identifier);
msg.send(plyr->get_session_player()->m_msg_id);
break;
}
}

View File

@ -3,6 +3,7 @@
#include "util/entity.hpp"
#include "util/scripts.hpp"
#include "script_function.hpp"
#include "services/script_patcher/script_patcher_service.hpp"
namespace big
{
@ -14,6 +15,7 @@ namespace big
if (g.self.dance_mode && g.self.dance_mode != bLastDanceMode)
{
g_script_patcher_service->update();
scripts::request_script(RAGE_JOAAT("am_mp_nightclub"));
if (!scripts::wait_till_loaded(RAGE_JOAAT("am_mp_nightclub")))
return;
@ -51,6 +53,7 @@ namespace big
g.m_dance_thread = nullptr;
g.m_dance_program = nullptr;
g_script_patcher_service->update();
bLastDanceMode = false;
return;
}

View File

@ -20,7 +20,7 @@ namespace big
{
if (log)
{
uint64_t rockstar_id = player->get_net_data() == nullptr ? 0 : player->get_net_data()->m_gamer_handle_2.m_rockstar_id;
uint64_t rockstar_id = player->get_net_data() == nullptr ? 0 : player->get_net_data()->m_gamer_handle.m_rockstar_id;
LOG(WARNING) << std::format("Received {} from {} ({})", m_event_name, player->get_name(), rockstar_id);
}

View File

@ -17,6 +17,8 @@ namespace big
g_script_patcher_service->add_patch({ RAGE_JOAAT("freemode"), "2D 00 CF 00 00 ", 5, { 0x2E, 0x00, 0x00 }, &g.session.block_ceo_raids });
g_script_patcher_service->add_patch({ RAGE_JOAAT("shop_controller"), "2D 01 04 00 00 2C ? ? ? 56 ? ? 71", 5, { 0x71, 0x2E, 0x01, 0x01 }, nullptr }); // despawn bypass
g_script_patcher_service->add_patch({ RAGE_JOAAT("shop_controller"), "38 00 5D ? ? ? 38 00 5D ? ? ? 38 00 41", 0, std::vector<uint8_t>(12, 0x0), nullptr}); // godmode/invisibility detection bypass
g_script_patcher_service->add_patch({ RAGE_JOAAT("am_mp_nightclub"), "2D 01 03 00 00 2C ? ? ? 56 ? ? 72 2E ? ? 38 00", 5, { 0x72, 0x2E, 0x01, 0x01 }, &g.self.dance_mode });
g_script_patcher_service->add_patch({ RAGE_JOAAT("am_mp_nightclub"), "20 56 ? ? 4F ? ? 46 ? ? 41 ? 71", 0, { 0x2B, 0x55 }, &g.self.dance_mode });
for (auto& entry : *g_pointers->m_script_program_table)
{

View File

@ -37,7 +37,7 @@ namespace big::scr_globals
static inline script_global vehicle_global = script_global(1586468);
static inline script_global mechanic_global = script_global(2793046);
static inline script_global spawn_global = script_global(2694560);
static inline script_global spawn_global = script_global(2694562);
}
namespace big::scr_locals

View File

@ -23,12 +23,12 @@ namespace big
if (g.notifications.player_leave.log)
LOG(INFO) << "Player left '" << net_player_data->m_name
<< "' freeing slot #" << (int)player->m_player_id
<< " with Rockstar ID: " << net_player_data->m_gamer_handle_2.m_rockstar_id;
<< " with Rockstar ID: " << net_player_data->m_gamer_handle.m_rockstar_id;
if (g.notifications.player_leave.notify)
{
g_notification_service->push("PLAYER_LEFT"_T.data(),
std::vformat("PLAYER_LEFT_INFO"_T, std::make_format_args(net_player_data->m_name, player->m_player_id, net_player_data->m_gamer_handle_2.m_rockstar_id)));
std::vformat("PLAYER_LEFT_INFO"_T, std::make_format_args(net_player_data->m_name, player->m_player_id, net_player_data->m_gamer_handle.m_rockstar_id)));
}
}
@ -45,12 +45,12 @@ namespace big
if (g.notifications.player_join.log)
LOG(INFO) << "Player joined '" << net_player_data->m_name
<< "' allocating slot #" << (int)player->m_player_id
<< " with Rockstar ID: " << net_player_data->m_gamer_handle_2.m_rockstar_id;
<< " with Rockstar ID: " << net_player_data->m_gamer_handle.m_rockstar_id;
if (g.notifications.player_join.notify)
{
g_notification_service->push("PLAYER_JOINED"_T.data(),
std::vformat("PLAYER_JOINED_INFO"_T, std::make_format_args(net_player_data->m_name, player->m_player_id, net_player_data->m_gamer_handle_2.m_rockstar_id)));
std::vformat("PLAYER_JOINED_INFO"_T, std::make_format_args(net_player_data->m_name, player->m_player_id, net_player_data->m_gamer_handle.m_rockstar_id)));
}
auto id = player->m_player_id;
@ -58,9 +58,9 @@ namespace big
{
if (auto plyr = g_player_service->get_by_id(id))
{
if (plyr->get_net_data()->m_gamer_handle_2.m_rockstar_id != 0)
if (plyr->get_net_data()->m_gamer_handle.m_rockstar_id != 0)
{
if (auto entry = g_player_database_service->get_player_by_rockstar_id(plyr->get_net_data()->m_gamer_handle_2.m_rockstar_id))
if (auto entry = g_player_database_service->get_player_by_rockstar_id(plyr->get_net_data()->m_gamer_handle.m_rockstar_id))
{
plyr->is_modder = entry->is_modder;
plyr->block_join = entry->block_join;

View File

@ -31,7 +31,7 @@ namespace big
{
bool hooks::add_player_to_session(rage::netConnectionManager* mgr, int receiver_msg_id, int* out_command_hndl, RemoteGamerInfoMsg* msg, int flags, void* unk)
{
if (msg->m_gamer_info.m_gamer_handle_2.m_rockstar_id == g_local_player->m_player_info->m_net_player_data.m_gamer_handle_2.m_rockstar_id && gta_util::get_network()->m_game_session_ptr->is_host() && g.protections.lessen_breakups)
if (msg->m_gamer_info.m_gamer_handle.m_rockstar_id == g_local_player->m_player_info->m_net_player_data.m_gamer_handle.m_rockstar_id && gta_util::get_network()->m_game_session_ptr->is_host() && g.protections.lessen_breakups)
{
std::uint64_t host_token = -1;

View File

@ -9,7 +9,7 @@ namespace big
{
bool hooks::handle_join_request(Network* network, rage::snSession* session, rage::rlGamerInfo* player_info, CJoinRequestContext* ctx, BOOL is_transition_session)
{
if (auto player = g_player_database_service->get_player_by_rockstar_id(player_info->m_gamer_handle_2.m_rockstar_id); player && player->block_join)
if (auto player = g_player_database_service->get_player_by_rockstar_id(player_info->m_gamer_handle.m_rockstar_id); player && player->block_join)
{
CMsgJoinResponse response{};
response.m_status_code = player->block_join_reason;

View File

@ -225,7 +225,7 @@ namespace big
gamer_handle_deserialize(handle, buffer);
auto self = g_player_service->get_self();
if (self->get_net_data() && self->get_net_data()->m_gamer_handle_2.m_rockstar_id == handle.m_rockstar_id)
if (self->get_net_data() && self->get_net_data()->m_gamer_handle.m_rockstar_id == handle.m_rockstar_id)
{
session::add_infraction(player, Infraction::TRIED_KICK_PLAYER);
g.reactions.lost_connection_kick.process(player);
@ -234,7 +234,7 @@ namespace big
for (auto& [_, plyr] : g_player_service->players())
{
if (plyr->get_net_data() && plyr != player && plyr->get_net_data()->m_gamer_handle_2.m_rockstar_id == handle.m_rockstar_id)
if (plyr->get_net_data() && plyr != player && plyr->get_net_data()->m_gamer_handle.m_rockstar_id == handle.m_rockstar_id)
{
session::add_infraction(player, Infraction::LOST_CONNECTION_KICK_DETECTED);
g.reactions.lost_connection_kick_others.process(player, plyr);
@ -246,7 +246,7 @@ namespace big
}
}
if (player->get_net_data() && player->get_net_data()->m_gamer_handle_2.m_rockstar_id == handle.m_rockstar_id)
if (player->get_net_data() && player->get_net_data()->m_gamer_handle.m_rockstar_id == handle.m_rockstar_id)
break;
else
return true;
@ -262,7 +262,7 @@ namespace big
gamer_handle_deserialize(handle, buffer);
if (session_id == gta_util::get_network()->m_game_session_ptr->m_rline_session.m_session_id)
{
if (handle.m_rockstar_id != player->get_net_data()->m_gamer_handle_2.m_rockstar_id)
if (handle.m_rockstar_id != player->get_net_data()->m_gamer_handle.m_rockstar_id)
{
session::add_infraction(player, Infraction::SPOOFED_ROCKSTAR_ID); // TODO: store this RID
}
@ -349,7 +349,7 @@ namespace big
gamer_handle_deserialize(handle, buffer);
auto self = g_player_service->get_self();
if (self->get_net_data() && self->get_net_data()->m_gamer_handle_2.m_rockstar_id == handle.m_rockstar_id)
if (self->get_net_data() && self->get_net_data()->m_gamer_handle.m_rockstar_id == handle.m_rockstar_id)
{
g_notification_service->push_error("KICK"_T.data(), "REMOTE_KICK_LOST_CONNECTION"_T.data());
return true;
@ -357,7 +357,7 @@ namespace big
for (auto& [_, plyr] : g_player_service->players())
{
if (plyr->get_net_data() && plyr->get_net_data()->m_gamer_handle_2.m_rockstar_id == handle.m_rockstar_id)
if (plyr->get_net_data() && plyr->get_net_data()->m_gamer_handle.m_rockstar_id == handle.m_rockstar_id)
{
g_notification_service->push_error("KICK"_T.data(),
std::vformat("REMOTE_KICK_LOST_CONNECTION_PLAYER"_T, std::make_format_args(plyr->get_name())));

View File

@ -367,10 +367,18 @@ namespace big
return true;
}
case eRemoteEvent::StartScriptBegin:
case eRemoteEvent::StartScriptProceed:
{
g.reactions.start_script.process(plyr);
return true;
// TODO: Breaks stuff
if (auto script = gta_util::find_script_thread(RAGE_JOAAT("freemode")))
{
if (script->m_net_component && script->m_net_component->m_host && script->m_net_component->m_host->m_net_game_player != player)
{
g.reactions.start_script.process(plyr);
return true;
}
}
break;
}
}

View File

@ -665,9 +665,9 @@ namespace big
});
// Encode Session Info
main_batch.add("ESI", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 20 57 48 81", [this](memory::handle ptr)
main_batch.add("ESI", "E8 ? ? ? ? C6 83 94 01 00 00 01", [this](memory::handle ptr)
{
m_encode_session_info = ptr.as<functions::encode_session_info>();
m_encode_session_info = ptr.add(1).rip().as<functions::encode_session_info>();
});
// Decode Session Info

View File

@ -20,7 +20,7 @@ namespace big
if (net_player == nullptr)
return false;
const auto rockstar_id = net_player->get_net_data()->m_gamer_handle_2.m_rockstar_id;
const auto rockstar_id = net_player->get_net_data()->m_gamer_handle.m_rockstar_id;
for (std::uint32_t i = 0; i < g_pointers->m_friend_registry->m_friend_count; i++)
if (rockstar_id == g_pointers->m_friend_registry->get(i)->m_rockstar_id)
return true;

View File

@ -60,13 +60,13 @@ namespace big
persistent_player* player_database_service::get_or_create_player(player_ptr player)
{
if (m_players.contains(player->get_net_data()->m_gamer_handle_2.m_rockstar_id))
return &m_players[player->get_net_data()->m_gamer_handle_2.m_rockstar_id];
if (m_players.contains(player->get_net_data()->m_gamer_handle.m_rockstar_id))
return &m_players[player->get_net_data()->m_gamer_handle.m_rockstar_id];
else
{
m_players[player->get_net_data()->m_gamer_handle_2.m_rockstar_id] = { player->get_name(), player->get_net_data()->m_gamer_handle_2.m_rockstar_id };
m_players[player->get_net_data()->m_gamer_handle.m_rockstar_id] = { player->get_name(), player->get_net_data()->m_gamer_handle.m_rockstar_id };
save();
return &m_players[player->get_net_data()->m_gamer_handle_2.m_rockstar_id];
return &m_players[player->get_net_data()->m_gamer_handle.m_rockstar_id];
}
}

View File

@ -3,6 +3,7 @@
#include "services/friends/friends_service.hpp"
#include "gta_util.hpp"
#include <network/Network.hpp>
#include <network/RemoteGamerInfoMsg.hpp>
namespace big
{
@ -70,7 +71,7 @@ namespace big
{
for (std::uint32_t i = 0; i < gta_util::get_network()->m_game_session_ptr->m_peer_count; i++)
{
if (gta_util::get_network()->m_game_session_ptr->m_peers[i]->m_peer_data.m_gamer_handle_2.m_rockstar_id == get_net_data()->m_gamer_handle_2.m_rockstar_id)
if (gta_util::get_network()->m_game_session_ptr->m_peers[i]->m_peer_data.m_gamer_handle.m_rockstar_id == get_net_data()->m_gamer_handle.m_rockstar_id)
{
return gta_util::get_network()->m_game_session_ptr->m_peers[i];
}
@ -79,6 +80,30 @@ namespace big
return nullptr;
}
netAddress player::get_ip_address()
{
if (this == g_player_service->get_self().get() && get_net_data())
return get_net_data()->m_external_ip;
if (auto session_player = get_session_player())
if (auto peer = g_pointers->m_get_connection_peer(gta_util::get_network()->m_game_session_ptr->m_net_connection_mgr, (int)get_session_player()->m_player_data.m_peer_id_2))
return netAddress{ ((netConnectionPeer*)peer)->m_external_ip };
return { 0 };
}
uint16_t player::get_port()
{
if (this == g_player_service->get_self().get() && get_net_data())
return get_net_data()->m_external_port;
if (auto session_player = get_session_player())
if (auto peer = g_pointers->m_get_connection_peer(gta_util::get_network()->m_game_session_ptr->m_net_connection_mgr, (int)get_session_player()->m_player_data.m_peer_id_2))
return ((netConnectionPeer*)peer)->m_external_port;
return 0;
}
uint8_t player::id() const
{
return m_net_game_player == nullptr ? -1 : m_net_game_player->m_player_id;

View File

@ -44,6 +44,8 @@ namespace big
[[nodiscard]] CPlayerInfo* get_player_info() const;
[[nodiscard]] class rage::snPlayer* get_session_player();
[[nodiscard]] class rage::snPeer* get_session_peer();
[[nodiscard]] netAddress get_ip_address();
[[nodiscard]] uint16_t get_port();
[[nodiscard]] uint8_t id() const;

View File

@ -21,7 +21,7 @@ namespace big::notify
if (player)
{
g_notification_service->push_error("Protections", std::format("Blocked {} crash from {}", crash, player->get_name()));
LOG(WARNING) << "Blocked " << crash << " crash from " << player->get_name() << " (" << (player->get_net_data() ? player->get_net_data()->m_gamer_handle_2.m_rockstar_id : 0) << ")";
LOG(WARNING) << "Blocked " << crash << " crash from " << player->get_name() << " (" << (player->get_net_data() ? player->get_net_data()->m_gamer_handle.m_rockstar_id : 0) << ")";
}
else
{

View File

@ -122,120 +122,6 @@ namespace big::session
g_notification_service->push_error("RID Joiner", "Target player is offline?");
}
inline void kick_by_rockstar_id(uint64_t rid)
{
rage::rlGamerHandle player_handle(rid);
rage::rlScHandle socialclub_handle(rid);
rage::rlSessionByGamerTaskResult get_session_result;
bool get_session_success = false;
rage::rlTaskStatus get_session_state{};
rage::snConnectToPeerTaskData connect_to_peer_data{};
rage::snConnectToPeerTaskResult connect_to_peer_result{};
rage::rlTaskStatus connect_to_peer_status{};
rage::rlQueryPresenceAttributesContext query_presence_attributes_context{};
rage::rlTaskStatus query_presence_attributes_status{};
rage::rlGamerInfoBase peer_address{};
query_presence_attributes_context.m_presence_attibute_type = 3; // string
strcpy(query_presence_attributes_context.m_presence_attribute_key, "peeraddr");
if (!g_pointers->m_start_get_presence_attributes(0, &socialclub_handle, &query_presence_attributes_context, 1, &query_presence_attributes_status))
{
g_notification_service->push_error("RID Kick", "Cannot start the query presence attributes rline task");
return;
}
while (query_presence_attributes_status.status == 1)
script::get_current()->yield();
if (query_presence_attributes_status.status != 3)
{
g_notification_service->push_error("RID Kick", "Querying presence attributes failed");
return;
}
g_pointers->m_decode_peer_info(&peer_address, query_presence_attributes_context.m_presence_attribute_value, nullptr);
if (!g_pointers->m_start_get_session_by_gamer_handle(0, &player_handle, 1, &get_session_result, 1, &get_session_success, &get_session_state))
{
g_notification_service->push_error("RID Kick", "Cannot start the get session by gamer handle task");
return;
}
while (get_session_state.status == 1)
script::get_current()->yield();
if (get_session_state.status != 3 || !get_session_success)
{
g_notification_service->push_error("RID Kick", "Getting session info failed");
return;
}
connect_to_peer_data.m_unk = 0;
connect_to_peer_data.m_reason = 5;
connect_to_peer_data.m_session_token = 0; // get_session_result.m_session_info.m_session_token; still works?
if (!g_pointers->m_connect_to_peer(gta_util::get_network()->m_game_session.m_net_connection_mgr, &peer_address, &connect_to_peer_data, &connect_to_peer_result, &connect_to_peer_status))
{
g_notification_service->push_error("RID Kick", "Failed to start a connection with player");
return;
}
g_notification_service->push("RID Kick", "Connecting to player...");
while (connect_to_peer_status.status == 1)
script::get_current()->yield();
if (connect_to_peer_status.status != 3)
{
g_notification_service->push_warning("RID Kick", "Failed to connect to player, not attempting to send gamer instruction kick");
}
else
{
// you can send a MsgTransitionLaunchNotify with an invalid connection ID to crash the player instead (remove the session obtaining code above to make it work in SP)
packet msg;
msg.write_message(rage::eNetMessage::MsgTransitionGamerInstruction);
gamer_handle_serialize(player_handle, msg.m_buffer); // src
gamer_handle_serialize(player_handle, msg.m_buffer); // target
msg.write<bool>(false, 1); // string extend
msg.write<int>(0, 7); // string length
msg.write<int>(8, 32); // instruction type
msg.write<int>(0, 32);
msg.write<int>(0, 32);
msg.send(connect_to_peer_result.m_peer_id, gta_util::get_network()->m_transition_session_ptr->m_connection_identifier);
g_notification_service->push("RID Kick", "Sent gamer instruction kick");
}
memset(&connect_to_peer_result, 0, sizeof(connect_to_peer_result));
connect_to_peer_status.status = 0;
if (!g_pointers->m_connect_to_peer(gta_util::get_network()->m_game_session.m_net_connection_mgr, &get_session_result.m_session_info.m_net_player_data, &connect_to_peer_data, &connect_to_peer_result, &connect_to_peer_status))
{
g_notification_service->push_error("RID Kick", "Failed to start a connection with the host");
return;
}
g_notification_service->push("RID Kick", "Connecting to host...");
while (connect_to_peer_status.status == 1)
script::get_current()->yield();
if (connect_to_peer_status.status != 3)
{
g_notification_service->push_error("RID Kick", "Failed to connect to the host");
return;
}
packet msg{};
msg.write_message(rage::eNetMessage::MsgLostConnectionToHost);
msg.write<uint64_t>(get_session_result.m_session_info.m_unk, 64);
gamer_handle_serialize(player_handle, msg);
msg.send(connect_to_peer_result.m_peer_id, gta_util::get_network()->m_game_session_ptr->m_connection_identifier);
g_notification_service->push("RID Kick", "Sent lost connection kick");
}
inline void join_by_username(std::string username)
{
g_thread_pool->push([username]
@ -253,23 +139,6 @@ namespace big::session
});
}
inline void kick_by_username(std::string username)
{
g_thread_pool->push([username]
{
uint64_t rid;
if (g_api_service->get_rid_from_username(username, rid))
{
g_fiber_pool->queue_job([rid]
{
kick_by_rockstar_id(rid);
});
return;
}
g_notification_service->push_error("RID Kick", "Target player is offline?");
});
}
inline void add_infraction(player_ptr player, Infraction infraction)
{
auto plyr = g_player_database_service->get_or_create_player(player);

View File

@ -59,7 +59,7 @@ namespace big::spam
auto& plData = *player->get_net_data();
spam_log << player->get_name() << " (" << plData.m_gamer_handle_2.m_rockstar_id << ") <"
spam_log << player->get_name() << " (" << plData.m_gamer_handle.m_rockstar_id << ") <"
<< (int)plData.m_external_ip.m_field1 << "." << (int)plData.m_external_ip.m_field2 << "." << (int)plData.m_external_ip.m_field3 << "." << (int)plData.m_external_ip.m_field4 <<
">: " << msg <<
std::endl;

View File

@ -52,6 +52,47 @@ namespace big
components::command_button<"fastquit">();
if (ImGui::TreeNode("Addresses"))
{
uint64_t local_cped = (uint64_t)g_local_player;
ImGui::InputScalar("Local CPed", ImGuiDataType_U64, &local_cped, NULL, NULL, "%p", ImGuiInputTextFlags_CharsHexadecimal);
if (g_local_player)
{
uint64_t local_playerinfo = (uint64_t)g_local_player->m_player_info;
ImGui::InputScalar("Local CPlayerInfo", ImGuiDataType_U64, &local_playerinfo, NULL, NULL, "%p", ImGuiInputTextFlags_CharsHexadecimal);
uint64_t local_vehicle = (uint64_t)g_local_player->m_vehicle;
ImGui::InputScalar("Local CAutomobile", ImGuiDataType_U64, &local_vehicle, NULL, NULL, "%p", ImGuiInputTextFlags_CharsHexadecimal);
}
if (auto mgr = *g_pointers->m_network_player_mgr)
{
uint64_t local_netplayer = (uint64_t)mgr->m_local_net_player;
ImGui::InputScalar("Local CNetGamePlayer", ImGuiDataType_U64, &local_netplayer, NULL, NULL, "%p", ImGuiInputTextFlags_CharsHexadecimal);
if (mgr->m_local_net_player)
{
uint64_t local_netplayer = (uint64_t)mgr->m_local_net_player->get_net_data();
ImGui::InputScalar("Local netPlayerData", ImGuiDataType_U64, &local_netplayer, NULL, NULL, "%p", ImGuiInputTextFlags_CharsHexadecimal);
}
}
if (auto network = *g_pointers->m_network)
{
uint64_t nw = (uint64_t)network;
ImGui::InputScalar("Network", ImGuiDataType_U64, &nw, NULL, NULL, "%p", ImGuiInputTextFlags_CharsHexadecimal);
}
if (auto omgr = *g_pointers->m_network_object_mgr)
{
uint64_t nw = (uint64_t)omgr;
ImGui::InputScalar("Network Object Mgr", ImGuiDataType_U64, &nw, NULL, NULL, "%p", ImGuiInputTextFlags_CharsHexadecimal);
}
ImGui::TreePop();
}
ImGui::EndTabItem();
}
}

View File

@ -123,11 +123,6 @@ namespace big
}
}
components::button("KICK"_T, []
{
session::kick_by_rockstar_id(current_player.rockstar_id);
});
components::button("JOIN_SESSION"_T, []
{
session::join_by_rockstar_id(current_player.rockstar_id);

View File

@ -24,11 +24,6 @@ namespace big
{
session::join_by_rockstar_id(rid);
});
ImGui::SameLine();
components::button("KICK_BY_RID"_T, []
{
session::kick_by_rockstar_id(rid);
});
static char username[20];
components::input_text("INPUT_USERNAME"_T, username, sizeof(username));
@ -36,11 +31,6 @@ namespace big
{
session::join_by_username(username);
};
ImGui::SameLine();
if (components::button("KICK_BY_USERNAME"_T))
{
session::kick_by_username(username);
};
static char base64[500]{};
components::input_text("SESSION_INFO"_T, base64, sizeof(base64));
@ -53,8 +43,8 @@ namespace big
ImGui::SameLine();
components::button("COPY_SESSION_INFO"_T, []
{
char buf[0x100];
g_pointers->m_encode_session_info(&gta_util::get_network()->m_game_session.m_rline_session.m_session_info, buf, 0x7D, nullptr);
char buf[0x100]{};
g_pointers->m_encode_session_info(&gta_util::get_network()->m_game_session.m_rline_session.m_session_info, buf, 0xA9, nullptr);
ImGui::SetClipboardText(buf);
});

View File

@ -11,7 +11,9 @@ namespace big
{
components::small_text("SPOOFING_DESCRIPTION"_T);
ImGui::Text("!!!!! Spoofing options like name and RID have become impossible to spoof with update 1.66 !!!!!");
components::sub_title("SPOOFING_HIDE_FEATURES"_T);
ImGui::Checkbox("SPOOFING_HIDE_GOD_MODE"_T.data(), &g.spoofing.spoof_hide_god);
ImGui::Checkbox("SPOOFING_HIDE_SPECTATE"_T.data(), &g.spoofing.spoof_hide_spectate);
components::sub_title("CREW"_T);
@ -31,14 +33,6 @@ namespace big
ImGui::Checkbox("SPOOFING_CREW_SQUARE_TAG"_T.data(), &g.spoofing.square_crew_tag);
components::sub_title("SPOOFING_EXTRA"_T);
ImGui::Checkbox("SPOOFING_IS_CHEATER"_T.data(), &g.spoofing.spoof_cheater);
// Can't spoof RID anymore
//ImGui::Checkbox("SPOOFING_IS_DEV"_T.data(), &g.spoofing.spoof_rockstar_dev);
//ImGui::Checkbox("SPOOFING_IS_QA"_T.data(), &g.spoofing.spoof_rockstar_qa);
components::sub_title("SPOOFING_SESSION_ATTRIBUTES"_T);
components::small_text("SPOOFING_ONLY_WORKS_AS_HOST"_T);

View File

@ -108,31 +108,34 @@ namespace big
if (auto net_player_data = g_player_service->get_selected()->get_net_data(); net_player_data != nullptr)
{
ImGui::Text("PLAYER_INFO_RID"_T.data(), net_player_data->m_gamer_handle_2.m_rockstar_id);
ImGui::Text("PLAYER_INFO_RID"_T.data(), net_player_data->m_gamer_handle.m_rockstar_id);
ImGui::SameLine();
ImGui::PushID("##rid");
if (ImGui::Button("COPY"_T.data())) ImGui::SetClipboardText(std::to_string(net_player_data->m_gamer_handle_2.m_rockstar_id).data());
if (ImGui::Button("COPY"_T.data())) ImGui::SetClipboardText(std::to_string(net_player_data->m_gamer_handle.m_rockstar_id).data());
ImGui::PopID();
auto ip = g_player_service->get_selected()->get_ip_address();
auto port = g_player_service->get_selected()->get_port();
ImGui::Text(
"PLAYER_INFO_IP"_T.data(),
net_player_data->m_external_ip.m_field1,
net_player_data->m_external_ip.m_field2,
net_player_data->m_external_ip.m_field3,
net_player_data->m_external_ip.m_field4,
net_player_data->m_external_port
ip.m_field1,
ip.m_field2,
ip.m_field3,
ip.m_field4,
port
);
ImGui::SameLine();
ImGui::PushID("##ip");
if (ImGui::Button("COPY"_T.data())) ImGui::SetClipboardText(std::format("{}.{}.{}.{}:{}", net_player_data->m_external_ip.m_field1,
net_player_data->m_external_ip.m_field2,
net_player_data->m_external_ip.m_field3,
net_player_data->m_external_ip.m_field4,
net_player_data->m_external_port).data());
if (ImGui::Button("COPY"_T.data())) ImGui::SetClipboardText(std::format("{}.{}.{}.{}:{}", ip.m_field1,
ip.m_field2,
ip.m_field3,
ip.m_field4,
port).data());
ImGui::PopID();
}

View File

@ -17,15 +17,17 @@ namespace big
{
components::player_command_button<"lckick">(g_player_service->get_selected());
});
components::player_command_button<"bailkick">(g_player_service->get_selected());
ImGui::SameLine();
components::player_command_button<"nfkick">(g_player_service->get_selected());
components::player_command_button<"oomkick">(g_player_service->get_selected());
ImGui::SameLine();
components::player_command_button<"gikick">(g_player_service->get_selected());
components::player_command_button<"shkick">(g_player_service->get_selected());
ImGui::SameLine();
components::player_command_button<"endkick">(g_player_service->get_selected());
ImGui::SameLine();
components::player_command_button<"desync">(g_player_service->get_selected());
ImGui::TreePop();

View File

@ -1,5 +1,6 @@
#include "views/view.hpp"
#include "util/scripts.hpp"
#include "script/globals/GPBD_FM_3.hpp"
namespace big
{