From cc566122e335d2047c9b1ba38e78c6d95d3d03a4 Mon Sep 17 00:00:00 2001 From: Yimura Date: Wed, 22 Jun 2022 12:19:00 +0200 Subject: [PATCH] feat(Protections): Prevent TSE freeze and alternative send to cayo --- BigBaseV2/src/core/enums.hpp | 1 + BigBaseV2/src/core/globals.hpp | 4 ++++ BigBaseV2/src/hooks/script_event_handler.cpp | 15 +++++++++++++++ .../views/settings/view_notification_settings.cpp | 5 +++-- 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/BigBaseV2/src/core/enums.hpp b/BigBaseV2/src/core/enums.hpp index b9dc9419..f5df4c70 100644 --- a/BigBaseV2/src/core/enums.hpp +++ b/BigBaseV2/src/core/enums.hpp @@ -136,6 +136,7 @@ namespace big RotateCam = 801199324, SendToCutscene = 1068259786, SendToIsland = -621279188, + SendToCayo = 1463943751, SoundSpam = 1132878564, Spectate = -1113591308, Teleport = 603406648, diff --git a/BigBaseV2/src/core/globals.hpp b/BigBaseV2/src/core/globals.hpp index 89629731..dd617191 100644 --- a/BigBaseV2/src/core/globals.hpp +++ b/BigBaseV2/src/core/globals.hpp @@ -57,6 +57,7 @@ namespace big pair sound_spam{}; pair spectate{}; pair transaction_error{}; + pair tse_freeze{}; pair vehicle_kick{}; } script_event_handler{}; @@ -408,6 +409,8 @@ namespace big script_handler.spectate.notify = script_handler_j["spectate"]["notify"]; script_handler.transaction_error.log = script_handler_j["transaction_error"]["log"]; script_handler.transaction_error.notify = script_handler_j["transaction_error"]["notify"]; + script_handler.tse_freeze.log = script_handler_j["tse_freeze"]["log"]; + script_handler.tse_freeze.notify = script_handler_j["tse_freeze"]["notify"]; script_handler.vehicle_kick.log = script_handler_j["vehicle_kick"]["log"]; script_handler.vehicle_kick.notify = script_handler_j["vehicle_kick"]["notify"]; } @@ -618,6 +621,7 @@ namespace big { "sound_spam", return_notify_pair(script_handler_notifications.sound_spam) }, { "spectate", return_notify_pair(script_handler_notifications.spectate) }, { "transaction_error", return_notify_pair(script_handler_notifications.transaction_error) }, + { "tse_freeze", return_notify_pair(script_handler_notifications.tse_freeze) }, { "vehicle_kick", return_notify_pair(script_handler_notifications.vehicle_kick) } } }, diff --git a/BigBaseV2/src/hooks/script_event_handler.cpp b/BigBaseV2/src/hooks/script_event_handler.cpp index db425a3b..c3781510 100644 --- a/BigBaseV2/src/hooks/script_event_handler.cpp +++ b/BigBaseV2/src/hooks/script_event_handler.cpp @@ -144,6 +144,21 @@ namespace big return true; } break; + case eRemoteEvent::SendToCayo: + if (args[2] == 0 && args[3] == 0 && args[4] == 3 && args[5] == 1 && args[6] == 0) + { + if (g->protections.script_events.send_to_island) + { + format_string(player_name, "Send to Cayo Beach", notify.send_to_island.log, notify.send_to_island.notify); + + return true; + } + break; + } + + format_string(player_name, "TSE Freeze", notify.tse_freeze.log, notify.tse_freeze.notify); + + return true; case eRemoteEvent::SendToCutscene: if (g->protections.script_events.send_to_cutscene) { diff --git a/BigBaseV2/src/views/settings/view_notification_settings.cpp b/BigBaseV2/src/views/settings/view_notification_settings.cpp index d43f3f8d..d96971f4 100644 --- a/BigBaseV2/src/views/settings/view_notification_settings.cpp +++ b/BigBaseV2/src/views/settings/view_notification_settings.cpp @@ -65,28 +65,29 @@ namespace big draw_pair_option("Destroy Personal Vehicle", script_event_handler.personal_vehicle_destroyed); draw_pair_option("Fake Deposit", script_event_handler.fake_deposit); draw_pair_option("Force Mission", script_event_handler.force_mission); + draw_pair_option("Force Teleport", script_event_handler.force_teleport); ImGui::EndGroup(); ImGui::SameLine(); ImGui::BeginGroup(); - draw_pair_option("Force Teleport", script_event_handler.force_teleport); draw_pair_option("GTA Banner", script_event_handler.gta_banner); draw_pair_option("MC Teleport", script_event_handler.mc_teleport); draw_pair_option("Network Bail", script_event_handler.network_bail); draw_pair_option("Remote Off Radar", script_event_handler.remote_off_radar); draw_pair_option("Rotate Cam", script_event_handler.rotate_cam); draw_pair_option("Send to Cutscene", script_event_handler.send_to_cutscene); + draw_pair_option("Send to Island", script_event_handler.send_to_island); ImGui::EndGroup(); ImGui::SameLine(); ImGui::BeginGroup(); - draw_pair_option("Send to Island", script_event_handler.send_to_island); draw_pair_option("Sound Spam", script_event_handler.sound_spam); draw_pair_option("Spectate", script_event_handler.spectate); draw_pair_option("Transaction Error", script_event_handler.transaction_error); draw_pair_option("TSE Crash", script_event_handler.crash); + draw_pair_option("TSE Freeze", script_event_handler.tse_freeze); draw_pair_option("Vehicle Kick", script_event_handler.vehicle_kick); draw_pair_option("Wanted Level", script_event_handler.clear_wanted_level); ImGui::EndGroup();