From ae64147d2f04df37be4175ee04d737ce6fee9d06 Mon Sep 17 00:00:00 2001 From: Baloo <73783549+41Baloo@users.noreply.github.com> Date: Thu, 22 Aug 2024 21:30:26 +0200 Subject: [PATCH] Added protection against remote ped flag setting (#3610) --- src/hooks/protections/received_event.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/hooks/protections/received_event.cpp b/src/hooks/protections/received_event.cpp index 1d05a709..ffad0b67 100644 --- a/src/hooks/protections/received_event.cpp +++ b/src/hooks/protections/received_event.cpp @@ -100,6 +100,15 @@ namespace big damageType = buffer->Read(2); weaponType = buffer->Read(32); + if ("WEAPON_TRANQUILIZER"_J == weaponType) + { + if (auto plyr = g_player_service->get_by_id(player->m_player_id)) + { + g.reactions.break_game.process(plyr); + } + return true; + } + if (!is_valid_weapon(weaponType)) { notify::crash_blocked(player, "invalid weapon type"); @@ -108,7 +117,6 @@ namespace big "Blocked WEAPON_DAMAGE_EVENT from {} with invalid weapon hash {:X}", player->get_name(), weaponType); - g_pointers->m_gta.m_send_event_ack(event_manager, player, target_player, event_index, event_handled_bitset); return true; }