From d68faff0949eb3b0a71f29deb9540616f35a8fa1 Mon Sep 17 00:00:00 2001 From: Yimura Date: Sat, 2 Jan 2021 11:52:36 +0100 Subject: [PATCH] fix(Events): Made all event hashes, function definitions and event enum to int64_t --- BigBaseV2/src/function_types.hpp | 2 +- BigBaseV2/src/gta/enums.hpp | 5 ++--- BigBaseV2/src/gui/player_window.cpp | 22 +++++++++++----------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/BigBaseV2/src/function_types.hpp b/BigBaseV2/src/function_types.hpp index 1c28bfaa..058efbdc 100644 --- a/BigBaseV2/src/function_types.hpp +++ b/BigBaseV2/src/function_types.hpp @@ -19,5 +19,5 @@ namespace big::functions using set_session_weather = void(char a1, int a2, int a3, int64_t a4); using spectate_player = bool(bool toggle, Ped player); using sync_local_time = void(int h, int m); - using trigger_script_event = int(bool unk0, uint64_t* args, int argCount, int bitFlags); + using trigger_script_event = int(bool unk0, int64_t* args, int argCount, int bitFlags); } diff --git a/BigBaseV2/src/gta/enums.hpp b/BigBaseV2/src/gta/enums.hpp index bd6029ac..c0c51477 100644 --- a/BigBaseV2/src/gta/enums.hpp +++ b/BigBaseV2/src/gta/enums.hpp @@ -1687,9 +1687,8 @@ enum PedBones : std::uint32_t FB_Tongue_001 = 0xB987 }; -enum RemoteEvents : std::int32_t +enum RemoteEvents : int64_t { - // new 1.52 shit Bounty = -116602735, CeoBan = -738295409, CeoKick = -1648921703, @@ -1700,7 +1699,7 @@ enum RemoteEvents : std::int32_t ForceMission2 = 915906776, ForceMission3 = 1764541627, GtaBanner = 639032041, - PersonalVehicleDestroyed = 891272013, //arg 3 = value + PersonalVehicleDestroyed = 891272013, RemoteOffradar = 575518757, RotateCam = 1120313136, SendToCutscene = -1879618040, diff --git a/BigBaseV2/src/gui/player_window.cpp b/BigBaseV2/src/gui/player_window.cpp index 5de423c8..16cae39e 100644 --- a/BigBaseV2/src/gui/player_window.cpp +++ b/BigBaseV2/src/gui/player_window.cpp @@ -62,13 +62,13 @@ namespace big { QUEUE_JOB_BEGIN_CLAUSE() { - uint64_t args[4] = { 0, (uint64_t)PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayer.id), 0, 0 }; + int64_t args[4] = { 0, PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayer.id), 0, 0 }; for (int64_t kick_hash : kick_hashes) { args[0] = kick_hash; - g_pointers->m_trigger_script_event(1, args, 4, 1 << g_selectedPlayer.id); + g_pointers->m_trigger_script_event(true, args, 4, 1 << g_selectedPlayer.id); } }QUEUE_JOB_END_CLAUSE } @@ -77,9 +77,9 @@ namespace big { QUEUE_JOB_BEGIN_CLAUSE() { - uint64_t args[2] = { (uint64_t)RemoteEvents::VehicleKick, (uint64_t)g_selectedPlayer.id }; + int64_t args[2] = { RemoteEvents::VehicleKick, g_selectedPlayer.id }; - g_pointers->m_trigger_script_event(1, args, 2, 1 << g_selectedPlayer.id); + g_pointers->m_trigger_script_event(true, args, 2, 1 << g_selectedPlayer.id); }QUEUE_JOB_END_CLAUSE } @@ -87,9 +87,9 @@ namespace big { QUEUE_JOB_BEGIN_CLAUSE() { - uint64_t ceokick[4] = { (uint64_t)RemoteEvents::CeoKick, (uint64_t)PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayer.id), 0, 0 }; + int64_t ceokick[4] = { RemoteEvents::CeoKick, PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayer.id), 0, 0 }; - g_pointers->m_trigger_script_event(1, ceokick, 4, 1 << g_selectedPlayer.id); + g_pointers->m_trigger_script_event(true, ceokick, 4, 1 << g_selectedPlayer.id); }QUEUE_JOB_END_CLAUSE } @@ -97,9 +97,9 @@ namespace big { QUEUE_JOB_BEGIN_CLAUSE() { - uint64_t ceoban[4] = { (uint64_t)RemoteEvents::CeoBan, (uint64_t)PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayer.id), 1, 5 }; + int64_t ceoban[4] = { RemoteEvents::CeoBan, PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayer.id), 1, 5 }; - g_pointers->m_trigger_script_event(1, ceoban, 4, 1 << g_selectedPlayer.id); + g_pointers->m_trigger_script_event(true, ceoban, 4, 1 << g_selectedPlayer.id); }QUEUE_JOB_END_CLAUSE } @@ -107,7 +107,7 @@ namespace big { QUEUE_JOB_BEGIN_CLAUSE() { - uint64_t args[2] = { (uint64_t)RemoteEvents::ForceMission, (uint64_t)PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayer.id) }; + int64_t args[2] = { RemoteEvents::ForceMission, PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayer.id) }; g_pointers->m_trigger_script_event(true, args, 2, 1 << g_selectedPlayer.id); }QUEUE_JOB_END_CLAUSE @@ -131,8 +131,8 @@ namespace big { QUEUE_JOB_BEGIN_CLAUSE() { - uint64_t args[9] = { (uint64_t)-171207973, (uint64_t)g_selectedPlayer.id, 1, (uint64_t)-1, 1, (uint64_t)location_ids[g_temp.teleport_location], 0,0,0 }; // 1097312011 - g_pointers->m_trigger_script_event(1, args, 9, 1 << g_selectedPlayer.id); + int64_t args[9] = { RemoteEvents::Teleport, g_selectedPlayer.id, 1, -1, 1, location_ids[g_temp.teleport_location], 0,0,0 }; // 1097312011 + g_pointers->m_trigger_script_event(true, args, 9, 1 << g_selectedPlayer.id); }QUEUE_JOB_END_CLAUSE }