mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-17 23:07:26 +08:00
Block traffic protection (#2688)
* fix: don't randomize components if we're cloning an existing ped * feat(protections): add traffic manipulation protection * fix(protections): add a mission check
This commit is contained in:
parent
70875b31ab
commit
d030bcbf4e
@ -283,8 +283,9 @@ namespace big
|
|||||||
bool admin_check = true;
|
bool admin_check = true;
|
||||||
bool kick_rejoin = true;
|
bool kick_rejoin = true;
|
||||||
bool force_relay_connections = false;
|
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{};
|
} protections{};
|
||||||
|
|
||||||
struct self
|
struct self
|
||||||
|
@ -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);
|
g_pointers->m_gta.m_send_event_ack(event_manager, source_player, target_player, event_index, event_handled_bitset);
|
||||||
return;
|
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);
|
buffer->Seek(0);
|
||||||
break;
|
break;
|
||||||
|
@ -56,6 +56,7 @@ namespace big
|
|||||||
ImGui::SetTooltip("VIEW_PROTECTION_SETTINGS_RECEIVE_PICKUP_TOOLTIP"_T.data());
|
ImGui::SetTooltip("VIEW_PROTECTION_SETTINGS_RECEIVE_PICKUP_TOOLTIP"_T.data());
|
||||||
ImGui::Checkbox("ADMIN_CHECK"_T.data(), &g.protections.admin_check);
|
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("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">();
|
components::command_checkbox<"forcerelays">();
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user