diff --git a/BigBaseV2/src/features.cpp b/BigBaseV2/src/features.cpp index f77cc1f5..aa35bf02 100644 --- a/BigBaseV2/src/features.cpp +++ b/BigBaseV2/src/features.cpp @@ -16,8 +16,9 @@ namespace big disable_phone(); god_mode(); - join_message(); + gravity_gun(); never_wanted(); + noclip(); no_bike_fall(); no_idle_kick(); no_ragdoll(); diff --git a/BigBaseV2/src/features.hpp b/BigBaseV2/src/features.hpp index 971ecbde..fc5e3a0f 100644 --- a/BigBaseV2/src/features.hpp +++ b/BigBaseV2/src/features.hpp @@ -32,8 +32,9 @@ namespace big void disable_phone(); void god_mode(); - void join_message(); + void gravity_gun(); void never_wanted(); + void noclip(); void no_bike_fall(); void no_idle_kick(); void no_ragdoll(); diff --git a/BigBaseV2/src/features/looped/noclip.cpp b/BigBaseV2/src/features/looped/noclip.cpp new file mode 100644 index 00000000..7bf00e39 --- /dev/null +++ b/BigBaseV2/src/features/looped/noclip.cpp @@ -0,0 +1,63 @@ +#include "features.hpp" + +namespace big +{ + static const int controls[] = { 21, 32, 33, 34, 35, 36 }; + static const float speed = 20.f; + static const float headingSpeed = 3.f; + + void features::noclip() + { + bool bNoclip = g_settings.options["noclip"]["enabled"]; + float fHorizontal = g_settings.options["noclip"]["horizontal"]; + float fVertical = g_settings.options["noclip"]["vertical"]; + + Entity ent = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId); + bool inVehicle = PED::IS_PED_IN_ANY_VEHICLE(ent, true); + if (inVehicle) ent = PED::GET_VEHICLE_PED_IS_IN(ent, false); + + if (bNoclip) + { + for (int control : controls) + PAD::DISABLE_CONTROL_ACTION(0, control, true); + + Vector3 cur_pos = ENTITY::GET_ENTITY_COORDS(ent, true); + Vector3 vel = { 0.f, 0.f, 0.07f }; + float heading = 0.f; + + // Left Shift + if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 21)) + vel.z += speed; + // Left Control + if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 36)) + vel.z -= speed; + // Forward + if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 32)) + vel.y += speed; + // Backward + if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 33)) + vel.y -= speed; + // Left + if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 34)) + { + if (inVehicle) heading += headingSpeed; + vel.x -= speed; + } + // Right + if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 35)) + { + if (inVehicle) heading -= headingSpeed; + vel.x += speed; + } + + Vector3 offset = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(ent, vel.x, vel.y, 0.f); + vel.x = offset.x - cur_pos.x; + vel.y = offset.y - cur_pos.y; + + ENTITY::SET_ENTITY_ROTATION(ent, 0.f, 0.f, ENTITY::GET_ENTITY_HEADING(ent) + heading, 0, true); + + ENTITY::SET_ENTITY_VELOCITY(ent, vel.x * fHorizontal, vel.y * fHorizontal, vel.z * fVertical); + } + ENTITY::SET_ENTITY_COLLISION(ent, !bNoclip, !bNoclip); + } +} \ No newline at end of file diff --git a/BigBaseV2/src/gui/tab_bar/tab_self.cpp b/BigBaseV2/src/gui/tab_bar/tab_self.cpp index 1f539328..6e46becb 100644 --- a/BigBaseV2/src/gui/tab_bar/tab_self.cpp +++ b/BigBaseV2/src/gui/tab_bar/tab_self.cpp @@ -27,6 +27,21 @@ namespace big ImGui::Separator(); + if (ImGui::TreeNode("No Clip")) + { + if (ImGui::Checkbox("No Clip", g_settings.options["noclip"]["enabled"].get())) + g_settings.save(); + + const double min = 0.0, max = 10.0; + if (ImGui::SliderScalar("Horizontal Multiplier", ImGuiDataType_Double, g_settings.options["noclip"]["horizontal"].get(), &min, &max)) + g_settings.save(); + if (ImGui::SliderScalar("Vertical Multiplier", ImGuiDataType_Double, g_settings.options["noclip"]["vertical"].get(), &min, &max)) + g_settings.save(); + + ImGui::TreePop(); + } + ImGui::Separator(); + if (ImGui::Checkbox("God Mode", g_settings.options["god_mode"].get()) || ImGui::Checkbox("No Ragdoll", g_settings.options["ragdoll"].get())) g_settings.save(); diff --git a/BigBaseV2/src/settings.h b/BigBaseV2/src/settings.h index 3b0ca6c7..43e46fff 100644 --- a/BigBaseV2/src/settings.h +++ b/BigBaseV2/src/settings.h @@ -16,8 +16,14 @@ namespace big "disable_phone": false, "disable_chat_censoring": false, "god_mode": false, + "gravity_gun": true, "join_message": false, "never_wanted": false, + "noclip": { + "enabled": false, + "horizontal": 5.0, + "vertical": 1.0 + }, "no_bike_fall": false, "no_idle_kick": false, "off_radar": false,