From d1c27d473866f1e281f85b75f7f3c9c9769b6aff Mon Sep 17 00:00:00 2001 From: Yimura Date: Sat, 26 Dec 2020 21:56:22 +0100 Subject: [PATCH] feat(Features): Added no bike fall looped feature --- BigBaseV2/src/features.cpp | 1 + BigBaseV2/src/features.hpp | 1 + BigBaseV2/src/features/no_bike_fall.cpp | 11 +++++++++++ BigBaseV2/src/gui/tab_bar/tab_vehicle.cpp | 2 ++ BigBaseV2/src/settings.h | 1 + 5 files changed, 16 insertions(+) create mode 100644 BigBaseV2/src/features/no_bike_fall.cpp diff --git a/BigBaseV2/src/features.cpp b/BigBaseV2/src/features.cpp index 727ef82e..bfbfa5d4 100644 --- a/BigBaseV2/src/features.cpp +++ b/BigBaseV2/src/features.cpp @@ -14,6 +14,7 @@ namespace big god_mode(); never_wanted(); + no_bike_fall(); no_idle_kick(); no_ragdoll(); off_radar(); diff --git a/BigBaseV2/src/features.hpp b/BigBaseV2/src/features.hpp index cca0d478..9d4fc56b 100644 --- a/BigBaseV2/src/features.hpp +++ b/BigBaseV2/src/features.hpp @@ -25,6 +25,7 @@ namespace big void god_mode(); void never_wanted(); + void no_bike_fall(); void no_idle_kick(); void no_ragdoll(); void off_radar(); diff --git a/BigBaseV2/src/features/no_bike_fall.cpp b/BigBaseV2/src/features/no_bike_fall.cpp new file mode 100644 index 00000000..1f6dfdb5 --- /dev/null +++ b/BigBaseV2/src/features/no_bike_fall.cpp @@ -0,0 +1,11 @@ +#include "features.hpp" + +namespace big +{ + void features::no_bike_fall() + { + bool bNoBikeFall = g_settings.options["no_bike_fall"].get(); + + PED::SET_PED_CAN_BE_KNOCKED_OFF_VEHICLE(PLAYER::PLAYER_PED_ID(), bNoBikeFall); + } +} \ No newline at end of file diff --git a/BigBaseV2/src/gui/tab_bar/tab_vehicle.cpp b/BigBaseV2/src/gui/tab_bar/tab_vehicle.cpp index e7ea9a2b..2bbf717d 100644 --- a/BigBaseV2/src/gui/tab_bar/tab_vehicle.cpp +++ b/BigBaseV2/src/gui/tab_bar/tab_vehicle.cpp @@ -7,6 +7,8 @@ namespace big { if (ImGui::BeginTabItem("Vehicle")) { + ImGui::Checkbox("No Bike Fall", g_settings.options["no_bike_fall"].get()); + if (ImGui::Button("Repair Vehicle")) { QUEUE_JOB_BEGIN_CLAUSE() diff --git a/BigBaseV2/src/settings.h b/BigBaseV2/src/settings.h index 8a9f0541..be9de1af 100644 --- a/BigBaseV2/src/settings.h +++ b/BigBaseV2/src/settings.h @@ -15,6 +15,7 @@ namespace big R"({ "god_mode": false, "never_wanted": false, + "no_bike_fall": false, "no_idle_kick": false, "off_radar": false, "ragdoll": false,