diff --git a/BigBaseV2/src/hooking.hpp b/BigBaseV2/src/hooking.hpp index 5975892d..7fdbc16c 100644 --- a/BigBaseV2/src/hooking.hpp +++ b/BigBaseV2/src/hooking.hpp @@ -25,7 +25,7 @@ namespace big static bool get_event_data(int32_t eventGroup, int32_t eventIndex, int64_t* args, uint32_t argCount); static void error_screen(char* entryHeader, char* entryLine1, int instructionalKey, char* entryLine2, BOOL p4, Any p5, Any* p6, Any* p7, BOOL background); static bool increment_stat_event(uint64_t net_event_struct, CNetGamePlayer* sender, int64_t a3); - static bool script_event_handler(std::int64_t NetEventStruct, std::int64_t CNetGamePlayer); + static bool script_event_handler(std::int64_t NetEventStruct, CNetGamePlayer* net_game_player); static bool send_net_info_to_lobby(rage::netPlayerData* local_player, int64_t a2, int64_t a3, DWORD* a4); }; diff --git a/BigBaseV2/src/hooks/script_event_handler.cpp b/BigBaseV2/src/hooks/script_event_handler.cpp index 0d004ecb..9225a992 100644 --- a/BigBaseV2/src/hooks/script_event_handler.cpp +++ b/BigBaseV2/src/hooks/script_event_handler.cpp @@ -6,10 +6,10 @@ namespace big { - bool hooks::script_event_handler(std::int64_t NetEventStruct, std::int64_t CNetGamePlayer) + bool hooks::script_event_handler(std::int64_t NetEventStruct, CNetGamePlayer* net_game_player) { auto args = reinterpret_cast(NetEventStruct + 0x70); - Player player = *reinterpret_cast(CNetGamePlayer + 0x2D); + Player player = net_game_player->player_id; int64_t hash = args[0]; @@ -35,6 +35,6 @@ namespace big LOG(INFO) << "Arg #" << i << ": " << args[i]; } - return g_hooking->m_script_event_hook.get_original()(NetEventStruct, CNetGamePlayer); + return g_hooking->m_script_event_hook.get_original()(NetEventStruct, net_game_player); } } \ No newline at end of file