diff --git a/BigBaseV2/src/backend/backend.cpp b/BigBaseV2/src/backend/backend.cpp index df51fd4e..942d6ebc 100644 --- a/BigBaseV2/src/backend/backend.cpp +++ b/BigBaseV2/src/backend/backend.cpp @@ -70,6 +70,7 @@ namespace big looped::vehicle_despawn_bypass(); looped::vehicle_god_mode(); looped::vehicle_horn_boost(); + looped::vehicle_is_targetable(); looped::vehicle_speedo_meter(); }QUEUE_JOB_END_CLAUSE diff --git a/BigBaseV2/src/backend/looped/looped.hpp b/BigBaseV2/src/backend/looped/looped.hpp index efe5944a..4a6e3e30 100644 --- a/BigBaseV2/src/backend/looped/looped.hpp +++ b/BigBaseV2/src/backend/looped/looped.hpp @@ -30,6 +30,7 @@ namespace big static void vehicle_despawn_bypass(); static void vehicle_god_mode(); static void vehicle_horn_boost(); + static void vehicle_is_targetable(); static void vehicle_ls_customs(); static void vehicle_speedo_meter(); diff --git a/BigBaseV2/src/backend/looped/vehicle/is_targetable.cpp b/BigBaseV2/src/backend/looped/vehicle/is_targetable.cpp new file mode 100644 index 00000000..b393d05b --- /dev/null +++ b/BigBaseV2/src/backend/looped/vehicle/is_targetable.cpp @@ -0,0 +1,10 @@ +#include "backend/looped/looped.hpp" + +namespace big +{ + void looped::vehicle_is_targetable() + { + if (g_local_player && g_local_player->m_vehicle) + g_local_player->m_vehicle->m_is_targetable = g->vehicle.is_targetable; + } +} \ No newline at end of file diff --git a/BigBaseV2/src/core/globals.hpp b/BigBaseV2/src/core/globals.hpp index 787ffe08..c1d0a2d0 100644 --- a/BigBaseV2/src/core/globals.hpp +++ b/BigBaseV2/src/core/globals.hpp @@ -110,6 +110,7 @@ namespace big bool god_mode = false; bool horn_boost = false; + bool is_targetable = true; bool ls_customs = false; // don't save this to disk bool pv_teleport_into = false; speedo_meter speedo_meter{}; @@ -211,6 +212,7 @@ namespace big this->vehicle.god_mode = j["vehicle"]["god_mode"]; this->vehicle.horn_boost = j["vehicle"]["horn_boost"]; + this->vehicle.is_targetable = j["vehicle"]["is_targetable"]; this->vehicle.pv_teleport_into = j["vehicle"]["pv_teleport_into"]; this->vehicle.speedo_meter.type = (SpeedoMeter)j["vehicle"]["speedo_meter"]["type"]; @@ -317,6 +319,7 @@ namespace big "vehicle", { { "god_mode", this->vehicle.god_mode }, { "horn_boost", this->vehicle.horn_boost }, + { "is_targetable", this->vehicle.is_targetable }, { "pv_teleport_into", this->vehicle.pv_teleport_into }, { "speedo_meter", { diff --git a/BigBaseV2/src/gui/window/main/tab_vehicle.cpp b/BigBaseV2/src/gui/window/main/tab_vehicle.cpp index ddb2d7e6..1bd4b778 100644 --- a/BigBaseV2/src/gui/window/main/tab_vehicle.cpp +++ b/BigBaseV2/src/gui/window/main/tab_vehicle.cpp @@ -2,9 +2,6 @@ #include "fiber_pool.hpp" #include "main_tabs.hpp" #include "script.hpp" -#include "util/blip.hpp" -#include "util/entity.hpp" -#include "util/notify.hpp" #include "util/vehicle.hpp" namespace big @@ -18,6 +15,7 @@ namespace big if (ImGui::TreeNode("General")) { ImGui::BeginGroup(); + ImGui::Checkbox("Can Be Targeted", &g->vehicle.is_targetable); ImGui::Checkbox("God Mode", &g->vehicle.god_mode); ImGui::Checkbox("Horn Boost", &g->vehicle.horn_boost);