Merge branch 'enhanced' of https://github.com/YimMenu/YimMenuV2 into enhanced

This commit is contained in:
maybegreat48
2025-03-31 21:38:12 -04:00
3 changed files with 62 additions and 1 deletions
@@ -0,0 +1,55 @@
#include "core/commands/BoolCommand.hpp"
#include "game/backend/ScriptPatches.hpp"
namespace YimMenu::Features
{
class DLCVehicles : public BoolCommand
{
using BoolCommand::BoolCommand;
ScriptPatch m_VehiclePOSIXPatch{};
ScriptPatch m_GetVehiclePricePatch{};
ScriptPatch m_BuyVehiclePatch{};
virtual void OnEnable() override
{
if (!m_VehiclePOSIXPatch)
{
m_VehiclePOSIXPatch = ScriptPatches::AddPatch("appinternet"_J, "59 ? ? 72 2E 02 01", 0, {0x2B, 0x00, 0x00});
}
m_VehiclePOSIXPatch->Enable();
if (!m_GetVehiclePricePatch)
{
m_GetVehiclePricePatch = ScriptPatches::AddPatch("appinternet"_J, "56 ? ? 70 2E 04 01 38 01", 0, {0x55});
}
m_GetVehiclePricePatch->Enable();
if (!m_BuyVehiclePatch)
{
m_BuyVehiclePatch = ScriptPatches::AddPatch("appinternet"_J, "5D ? ? ? 06 56 ? ? 38 00 25 ? 50", 5, {0x55});
}
m_BuyVehiclePatch->Enable();
}
virtual void OnDisable() override
{
if (m_VehiclePOSIXPatch)
{
m_VehiclePOSIXPatch->Disable();
}
if (m_GetVehiclePricePatch)
{
m_GetVehiclePricePatch->Disable();
}
if (m_BuyVehiclePatch)
{
m_BuyVehiclePatch->Disable();
}
}
};
static DLCVehicles _DLCVehicles{"dlcvehicles", "Enable All DLC Vehicles", "Enables all the DLC vehicles on websites."};
}
+2
View File
@@ -11,6 +11,8 @@ namespace YimMenu::Submenus
auto shopping = std::make_shared<Category>("Shopping");
auto vehiclesGroup = std::make_shared<Group>("Vehicles");
vehiclesGroup->AddItem(std::make_shared<BoolCommandItem>("dlcvehicles"_J));
vehiclesGroup->AddItem(std::make_unique<ImGuiItem>([] {
if (ImGui::Button("Save This Vehicle as Personal Vehicle"))
{
+5 -1
View File
@@ -111,5 +111,9 @@ namespace Data
"WEAPON_TACTICALRIFLE"_J,
"WEAPON_EMPLAUNCHER"_J,
"WEAPON_HEAVYRIFLE"_J,
"WEAPON_STUNROD"_J,
"weapon_acidpackage"_J,
"weapon_fertilizercan"_J,
"WEAPON_STRICKLER"_J,
});
}
}