From 4801992b22c3da7160d2b9427d8bcb90abfb3cb0 Mon Sep 17 00:00:00 2001 From: SAMURAI <66764345+xesdoog@users.noreply.github.com> Date: Mon, 7 Apr 2025 22:04:51 +0100 Subject: [PATCH] feat(Various): 3 New Features (#117) - Self: Stand On Vehicles: This was requested a long time ago in Legacy YimMenu but was never added. - Self: Disable Action Mode: Disables the player's forced weird stance during combat. - Vehicle: Allow Hats Inside Vehicles: Prevents the player's headgear from being removed when they enter a vehicle. --- src/game/features/self/DisableActionMode.cpp | 18 ++++++++++++++++++ src/game/features/self/StandOnVehicles.cpp | 18 ++++++++++++++++++ .../features/vehicle/AllowHatsInVehicles.cpp | 18 ++++++++++++++++++ src/game/frontend/submenus/Self.cpp | 3 +++ 4 files changed, 57 insertions(+) create mode 100644 src/game/features/self/DisableActionMode.cpp create mode 100644 src/game/features/self/StandOnVehicles.cpp create mode 100644 src/game/features/vehicle/AllowHatsInVehicles.cpp diff --git a/src/game/features/self/DisableActionMode.cpp b/src/game/features/self/DisableActionMode.cpp new file mode 100644 index 0000000..269215d --- /dev/null +++ b/src/game/features/self/DisableActionMode.cpp @@ -0,0 +1,18 @@ +#include "core/commands/LoopedCommand.hpp" +#include "game/backend/Self.hpp" +#include "game/gta/Natives.hpp" + +namespace YimMenu::Features +{ + class DisableActionMode : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + + virtual void OnTick() override + { + PED::SET_PED_RESET_FLAG(Self::GetPed().GetHandle(), 200, true); + } + }; + + static DisableActionMode _DisableActionMode{"disableactionmode", "Disable Action Mode", "Disables the player's janky movement during combat."}; +}; diff --git a/src/game/features/self/StandOnVehicles.cpp b/src/game/features/self/StandOnVehicles.cpp new file mode 100644 index 0000000..be56ecf --- /dev/null +++ b/src/game/features/self/StandOnVehicles.cpp @@ -0,0 +1,18 @@ +#include "core/commands/LoopedCommand.hpp" +#include "game/backend/Self.hpp" +#include "game/gta/Natives.hpp" + +namespace YimMenu::Features +{ + class StandOnVehicles : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + + virtual void OnTick() override + { + PED::SET_PED_RESET_FLAG(Self::GetPed().GetHandle(), 274, true); + } + }; + + static StandOnVehicles _StandOnVehicles{"standonvehicles", "Stand On Vehicles", "Prevents you from ragdolling when standing on top of vehicles."}; +}; diff --git a/src/game/features/vehicle/AllowHatsInVehicles.cpp b/src/game/features/vehicle/AllowHatsInVehicles.cpp new file mode 100644 index 0000000..72f9aba --- /dev/null +++ b/src/game/features/vehicle/AllowHatsInVehicles.cpp @@ -0,0 +1,18 @@ +#include "core/commands/LoopedCommand.hpp" +#include "game/backend/Self.hpp" +#include "game/gta/Natives.hpp" + +namespace YimMenu::Features +{ + class AllowHatsInVehicles : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + + virtual void OnTick() override + { + PED::SET_PED_RESET_FLAG(Self::GetPed().GetHandle(), 337, true); + } + }; + + static AllowHatsInVehicles _AllowHatsInVehicles{"allowhatsinvehicles", "Allow Hats In Vehicles", "Allows you to keep your hats or head gear inside vehicles."}; +}; diff --git a/src/game/frontend/submenus/Self.cpp b/src/game/frontend/submenus/Self.cpp index 8bb8f89..caa9472 100644 --- a/src/game/frontend/submenus/Self.cpp +++ b/src/game/frontend/submenus/Self.cpp @@ -43,6 +43,8 @@ namespace YimMenu::Submenus toolsGroup->AddItem(std::make_shared("cleardamage"_J)); toolsGroup->AddItem(std::make_shared("fillinventory"_J)); + movementGroup->AddItem(std::make_shared("standonvehicles"_J)); + movementGroup->AddItem(std::make_shared("disableactionmode"_J)); movementGroup->AddItem(std::make_shared("superrun"_J)); movementGroup->AddItem(std::make_shared("superjump"_J)); movementGroup->AddItem(std::make_shared("noclip"_J)); @@ -82,6 +84,7 @@ namespace YimMenu::Submenus vehicleMiscGroup->AddItem(std::make_shared("speedometer"_J)); vehicleMiscGroup->AddItem(std::make_shared("seatbelt"_J)); + vehicleMiscGroup->AddItem(std::make_shared("allowhatsinvehicles"_J)); vehicle->AddItem(vehicleGlobalsGroup); vehicle->AddItem(vehicleMiscGroup);