diff --git a/BigBaseV2/src/features/looped/protections/replay_interface.cpp b/BigBaseV2/src/features/looped/protections/replay_interface.cpp index 149197d3..5d0f170f 100644 --- a/BigBaseV2/src/features/looped/protections/replay_interface.cpp +++ b/BigBaseV2/src/features/looped/protections/replay_interface.cpp @@ -6,6 +6,8 @@ namespace big { void features::replay_interface() { + Ped player = PLAYER::PLAYER_PED_ID(); + rage::CReplayInterface* replay_interf = *g_pointers->m_replay_interface; rage::CObjectInterface* object_interf = replay_interf->m_object_interface; @@ -19,10 +21,17 @@ namespace big Object ent = g_pointers->m_ptr_to_handle(obj); - if (protections["cage"] && ENTITY::GET_ENTITY_MODEL(ent) == RAGE_JOAAT("prop_gold_cont_01")) - { + if ( + protections["attach"] && + ( + ENTITY::IS_ENTITY_ATTACHED_TO_ENTITY(player, ent) || + ENTITY::IS_ENTITY_ATTACHED_TO_ENTITY(PED::GET_VEHICLE_PED_IS_IN(player, true), ent) + ) + ) + functions::delete_entity(ent); + + if (protections["cage"] && ENTITY::GET_ENTITY_MODEL(ent) == RAGE_JOAAT("prop_gold_cont_01")) functions::delete_entity(ent); - } } } } \ No newline at end of file diff --git a/BigBaseV2/src/function_types.hpp b/BigBaseV2/src/function_types.hpp index bfc7c5d9..8cbade1e 100644 --- a/BigBaseV2/src/function_types.hpp +++ b/BigBaseV2/src/function_types.hpp @@ -1,6 +1,7 @@ #pragma once #include "common.hpp" #include "gta/fwddec.hpp" +#include "gta/replay.hpp" #include "gta/natives.hpp" namespace big::functions @@ -19,4 +20,6 @@ namespace big::functions using spectate_player = bool(bool toggle, Ped player); using sync_local_time = void(int h, int m); using trigger_script_event = int(bool unk0, int64_t* args, int argCount, int bitFlags); + + using ptr_to_handle = int(rage::CObject* a1); } diff --git a/BigBaseV2/src/gui/tab_bar/main/settings.cpp b/BigBaseV2/src/gui/tab_bar/main/settings.cpp index cc9b7533..1a6cd591 100644 --- a/BigBaseV2/src/gui/tab_bar/main/settings.cpp +++ b/BigBaseV2/src/gui/tab_bar/main/settings.cpp @@ -84,6 +84,7 @@ namespace big auto& protections = g_settings.options["settings"]["protections"]; if ( + ImGui::Checkbox("Attach Protection", protections["attach"].get()) || ImGui::Checkbox("Cage Protection", protections["cage"].get())// || //ImGui::Checkbox("Version Mismatch Protection", protections["version_mismatch"].get()) )