diff --git a/src/core/settings.hpp b/src/core/settings.hpp index 303dfa9c..66a27de2 100644 --- a/src/core/settings.hpp +++ b/src/core/settings.hpp @@ -283,8 +283,9 @@ namespace big bool admin_check = true; bool kick_rejoin = true; bool force_relay_connections = false; + bool stop_traffic = true; - NLOHMANN_DEFINE_TYPE_INTRUSIVE(protections, script_events, rid_join, receive_pickup, admin_check, kick_rejoin, force_relay_connections) + NLOHMANN_DEFINE_TYPE_INTRUSIVE(protections, script_events, rid_join, receive_pickup, admin_check, kick_rejoin, force_relay_connections, stop_traffic) } protections{}; struct self diff --git a/src/hooks/protections/received_event.cpp b/src/hooks/protections/received_event.cpp index 42c93baa..aab0f576 100644 --- a/src/hooks/protections/received_event.cpp +++ b/src/hooks/protections/received_event.cpp @@ -564,6 +564,11 @@ namespace big g_pointers->m_gta.m_send_event_ack(event_manager, source_player, target_player, event_index, event_handled_bitset); return; } + else if (type == WorldStateDataType::PopMultiplierArea && g.protections.stop_traffic && !NETWORK::NETWORK_IS_ACTIVITY_SESSION()) + { + g_pointers->m_gta.m_send_event_ack(event_manager, source_player, target_player, event_index, event_handled_bitset); + return; + } buffer->Seek(0); break; diff --git a/src/views/settings/view_protection_settings.cpp b/src/views/settings/view_protection_settings.cpp index 720e607c..042b8b6a 100644 --- a/src/views/settings/view_protection_settings.cpp +++ b/src/views/settings/view_protection_settings.cpp @@ -56,6 +56,7 @@ namespace big ImGui::SetTooltip("VIEW_PROTECTION_SETTINGS_RECEIVE_PICKUP_TOOLTIP"_T.data()); ImGui::Checkbox("ADMIN_CHECK"_T.data(), &g.protections.admin_check); ImGui::Checkbox("VIEW_PROTECTION_SETTINGS_KICK_REJOIN"_T.data(), &g.protections.kick_rejoin); + ImGui::Checkbox("BLOCK_TRAFFIC_MANIPULATION"_T.data(), &g.protections.stop_traffic); components::command_checkbox<"forcerelays">(); ImGui::EndGroup();