diff --git a/BigBaseV2/src/core/enums.hpp b/BigBaseV2/src/core/enums.hpp index ceb43dfb..67a06808 100644 --- a/BigBaseV2/src/core/enums.hpp +++ b/BigBaseV2/src/core/enums.hpp @@ -144,8 +144,8 @@ namespace big RemoteOffradar = -391633760, RotateCam = 801199324, SendToCutscene = 1068259786, - SendToIsland = -621279188, - SendToCayo = 1463943751, + SendToCayoPerico = -621279188, + SendToLocation = 1463943751, SoundSpam = 1132878564, Spectate = -1113591308, Teleport = 603406648, diff --git a/BigBaseV2/src/core/globals.hpp b/BigBaseV2/src/core/globals.hpp index 414837d6..4716bd27 100644 --- a/BigBaseV2/src/core/globals.hpp +++ b/BigBaseV2/src/core/globals.hpp @@ -55,7 +55,7 @@ namespace big pair remote_off_radar{}; pair rotate_cam{}; pair send_to_cutscene{}; - pair send_to_island{}; + pair send_to_location{}; pair sound_spam{}; pair spectate{}; pair transaction_error{}; @@ -110,7 +110,7 @@ namespace big bool remote_off_radar = true; bool rotate_cam = true; bool send_to_cutscene = true; - bool send_to_island = true; + bool send_to_location = true; bool sound_spam = true; bool spectate = true; bool transaction_error = true; @@ -446,8 +446,8 @@ namespace big script_handler.rotate_cam.notify = script_handler_j["rotate_cam"]["notify"]; script_handler.send_to_cutscene.log = script_handler_j["send_to_cutscene"]["log"]; script_handler.send_to_cutscene.notify = script_handler_j["send_to_cutscene"]["notify"]; - script_handler.send_to_island.log = script_handler_j["send_to_island"]["log"]; - script_handler.send_to_island.notify = script_handler_j["send_to_island"]["notify"]; + script_handler.send_to_location.log = script_handler_j["send_to_location"]["log"]; + script_handler.send_to_location.notify = script_handler_j["send_to_location"]["notify"]; script_handler.sound_spam.log = script_handler_j["sound_spam"]["log"]; script_handler.sound_spam.notify = script_handler_j["sound_spam"]["notify"]; script_handler.spectate.log = script_handler_j["spectate"]["log"]; @@ -486,7 +486,7 @@ namespace big script_handler.remote_off_radar = script_handler_j["remote_off_radar"]; script_handler.rotate_cam = script_handler_j["rotate_cam"]; script_handler.send_to_cutscene = script_handler_j["send_to_cutscene"]; - script_handler.send_to_island = script_handler_j["send_to_island"]; + script_handler.send_to_location = script_handler_j["send_to_location"]; script_handler.sound_spam = script_handler_j["sound_spam"]; script_handler.spectate = script_handler_j["spectate"]; script_handler.transaction_error = script_handler_j["transaction_error"]; @@ -702,7 +702,7 @@ namespace big { "remote_off_radar", return_notify_pair(script_handler_notifications.remote_off_radar) }, { "rotate_cam", return_notify_pair(script_handler_notifications.rotate_cam) }, { "send_to_cutscene", return_notify_pair(script_handler_notifications.send_to_cutscene) }, - { "send_to_island", return_notify_pair(script_handler_notifications.send_to_island) }, + { "send_to_location", return_notify_pair(script_handler_notifications.send_to_location) }, { "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) }, @@ -736,7 +736,7 @@ namespace big { "remote_off_radar", script_handler_protections.remote_off_radar }, { "rotate_cam", script_handler_protections.rotate_cam }, { "send_to_cutscene", script_handler_protections.send_to_cutscene }, - { "send_to_island", script_handler_protections.send_to_island }, + { "send_to_location", script_handler_protections.send_to_location }, { "sound_spam", script_handler_protections.sound_spam }, { "spectate", script_handler_protections.spectate }, { "transaction_error", script_handler_protections.transaction_error }, diff --git a/BigBaseV2/src/hooks/protections/script_event_handler.cpp b/BigBaseV2/src/hooks/protections/script_event_handler.cpp index 5e2677a3..70c69d93 100644 --- a/BigBaseV2/src/hooks/protections/script_event_handler.cpp +++ b/BigBaseV2/src/hooks/protections/script_event_handler.cpp @@ -144,19 +144,10 @@ namespace big return true; } break; - case eRemoteEvent::SendToCayo: - if (args[2] == 0 && args[3] == 0 && args[4] == 3 && args[5] == 1 && args[6] == 0) + case eRemoteEvent::SendToCayoPerico: + if (g->protections.script_events.send_to_location) { - 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; - } - } - else - { - format_string(player_name, "TSE Freeze", notify.tse_freeze.log, notify.tse_freeze.notify); + format_string(player_name, "Send to Cayo Perico", notify.send_to_location.log, notify.send_to_location.notify); return true; } @@ -169,14 +160,44 @@ namespace big return true; } break; - case eRemoteEvent::SendToIsland: - if (g->protections.script_events.send_to_island) + case eRemoteEvent::SendToLocation: + { + bool known_location = false; + + if (args[2] == 0 && args[3] == 0) { - format_string(player_name, "Send to Island", notify.send_to_island.log, notify.send_to_island.notify); + if (args[4] == 4 && args[5] == 0) + { + known_location = true; + + if (g->protections.script_events.send_to_location) + { + format_string(player_name, "Send to Beach", notify.send_to_location.log, notify.send_to_location.notify); + + return true; + } + } + else if ((args[4] == 3 || args[4] == 4) && args[5] == 1) + { + known_location = true; + + if (g->protections.script_events.send_to_location) + { + format_string(player_name, "Send to Cayo Perico", notify.send_to_location.log, notify.send_to_location.notify); + + return true; + } + } + } + + if (!known_location) + { + format_string(player_name, "TSE Freeze", notify.tse_freeze.log, notify.tse_freeze.notify); return true; } break; + } case eRemoteEvent::SoundSpam: if (g->protections.script_events.sound_spam) { diff --git a/BigBaseV2/src/views/settings/view_notification_settings.cpp b/BigBaseV2/src/views/settings/view_notification_settings.cpp index d96971f4..121c08aa 100644 --- a/BigBaseV2/src/views/settings/view_notification_settings.cpp +++ b/BigBaseV2/src/views/settings/view_notification_settings.cpp @@ -77,7 +77,7 @@ namespace big 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); + draw_pair_option("Send to Location", script_event_handler.send_to_location); ImGui::EndGroup(); ImGui::SameLine(); diff --git a/BigBaseV2/src/views/settings/view_protection_settings.cpp b/BigBaseV2/src/views/settings/view_protection_settings.cpp index b67d1941..92eaffe8 100644 --- a/BigBaseV2/src/views/settings/view_protection_settings.cpp +++ b/BigBaseV2/src/views/settings/view_protection_settings.cpp @@ -30,7 +30,7 @@ namespace big ImGui::BeginGroup(); ImGui::Checkbox("Send to Cutscene", &g->protections.script_events.send_to_cutscene); - ImGui::Checkbox("Send to Island", &g->protections.script_events.send_to_island); + ImGui::Checkbox("Send to Location", &g->protections.script_events.send_to_location); ImGui::Checkbox("Sound Spam", &g->protections.script_events.sound_spam); ImGui::Checkbox("Spectate", &g->protections.script_events.spectate); ImGui::Checkbox("Transaction Error", &g->protections.script_events.transaction_error);