diff --git a/src/game/features/vehicle/BigLoudSubwoofer.cpp b/src/game/features/vehicle/BigLoudSubwoofer.cpp new file mode 100644 index 00000000..710c994f --- /dev/null +++ b/src/game/features/vehicle/BigLoudSubwoofer.cpp @@ -0,0 +1,29 @@ +#include "core/commands/LoopedCommand.hpp" +#include "game/backend/Self.hpp" +#include "game/gta/Natives.hpp" +#include "game/gta/Pools.hpp" + +namespace YimMenu::Features +{ + class AllVehsLoudRadio : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + + virtual void OnTick() override + { + for (auto veh : Pools::GetVehicles()) + { + veh.ForceControl(); + auto handle = veh.GetHandle(); + auto target_veh = Vehicle(handle); + if (target_veh.RequestControl()) + AUDIO::SET_VEHICLE_RADIO_ENABLED(handle, 1); + AUDIO::SET_VEHICLE_RADIO_LOUD(handle, 1); + VEHICLE::SET_VEHICLE_ENGINE_ON(handle, 1, 1, 0); + } + return; + } + }; + + static AllVehsLoudRadio _AllVehsLoudRadio{"loudsubwoffer", "Subwoofer", "Enables loud radio on vehicles, Players can hear it."}; +} diff --git a/src/game/frontend/submenus/Vehicle.cpp b/src/game/frontend/submenus/Vehicle.cpp index 63fda329..56e6e3fe 100644 --- a/src/game/frontend/submenus/Vehicle.cpp +++ b/src/game/frontend/submenus/Vehicle.cpp @@ -8,7 +8,7 @@ namespace YimMenu::Submenus { Vehicle::Vehicle() : #define ICON_FA_CAR "\xef\x86\xb9" - Submenu::Submenu("Vehicle", ICON_FA_CAR) + Submenu::Submenu("Vehicle", ICON_FA_CAR) { auto main = std::make_shared("Main"); @@ -32,6 +32,7 @@ namespace YimMenu::Submenus misc->AddItem(std::make_shared("speedometer"_J)); misc->AddItem(std::make_shared("seatbelt"_J)); + misc->AddItem(std::make_shared("loudsubwoffer"_J)); misc->AddItem(std::make_shared("lowervehiclestance"_J, "Lower Stance")); misc->AddItem(std::make_shared("allowhatsinvehicles"_J)); misc->AddItem(std::make_shared("lsccustomsbypass"_J)); @@ -46,4 +47,4 @@ namespace YimMenu::Submenus AddCategory(BuildVehicleEditorMenu()); AddCategory(BuildSavedVehiclesMenu()); } -} \ No newline at end of file +} diff --git a/src/game/pointers/Pointers.cpp b/src/game/pointers/Pointers.cpp index a3a5db19..04d79898 100644 --- a/src/game/pointers/Pointers.cpp +++ b/src/game/pointers/Pointers.cpp @@ -509,4 +509,4 @@ namespace YimMenu PatternCache::Update(); return true; } -} \ No newline at end of file +}