mirror of
https://github.com/YimMenu/YimMenuV2.git
synced 2026-10-10 03:43:15 +08:00
Merge branch 'enhanced' of https://github.com/YimMenu/YimMenuV2 into enhanced
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#include "core/commands/BoolCommand.hpp"
|
||||
#include "game/gta/Stats.hpp"
|
||||
|
||||
namespace YimMenu::Features
|
||||
{
|
||||
class AllowGenderChange : public BoolCommand
|
||||
{
|
||||
using BoolCommand::BoolCommand;
|
||||
|
||||
virtual void OnEnable() override
|
||||
{
|
||||
Stats::SetInt("MPX_ALLOW_GENDER_CHANGE", 52);
|
||||
}
|
||||
|
||||
virtual void OnDisable() override
|
||||
{
|
||||
Stats::SetInt("MPX_ALLOW_GENDER_CHANGE", 0);
|
||||
}
|
||||
};
|
||||
|
||||
static AllowGenderChange _AllowGenderChange{"allowgenderchange", "Allow Gender Change", "Allows the player to change the character's gender"};
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
#include "core/commands/BoolCommand.hpp"
|
||||
#include "game/backend/Tunables.hpp"
|
||||
|
||||
namespace YimMenu::Features
|
||||
{
|
||||
|
||||
class FreeChangeAppearance : public BoolCommand
|
||||
{
|
||||
using BoolCommand::BoolCommand;
|
||||
|
||||
Tunable m_CharacterAppearanceCharge{"CHARACTER_APPEARANCE_CHARGE"_J};
|
||||
|
||||
virtual void OnEnable() override
|
||||
{
|
||||
if(m_CharacterAppearanceCharge.IsReady()) m_CharacterAppearanceCharge.Set(0);
|
||||
}
|
||||
|
||||
virtual void OnDisable() override
|
||||
{
|
||||
if (m_CharacterAppearanceCharge.IsReady())
|
||||
m_CharacterAppearanceCharge.Set(100000);
|
||||
}
|
||||
};
|
||||
|
||||
static FreeChangeAppearance _FreeChangeAppearance{"freechangeappearance", "Change Appearance For Free", "Allows the player to change the character's appearance for free"};
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
#include "core/commands/BoolCommand.hpp"
|
||||
#include "game/backend/Tunables.hpp"
|
||||
|
||||
|
||||
namespace YimMenu::Features
|
||||
{
|
||||
class NoChangeAppearanceCooldown : public BoolCommand
|
||||
{
|
||||
using BoolCommand::BoolCommand;
|
||||
|
||||
Tunable m_CharacterAppearanceCooldown{"CHARACTER_APPEARANCE_COOLDOWN"_J};
|
||||
|
||||
virtual void OnEnable() override
|
||||
{
|
||||
if (m_CharacterAppearanceCooldown.IsReady())
|
||||
m_CharacterAppearanceCooldown.Set(0);
|
||||
}
|
||||
|
||||
virtual void OnDisable() override
|
||||
{
|
||||
if (m_CharacterAppearanceCooldown.IsReady())
|
||||
m_CharacterAppearanceCooldown.Set(2880000);
|
||||
}
|
||||
};
|
||||
|
||||
static NoChangeAppearanceCooldown _NoChangeAppearanceCooldown{"nochangeappearancecooldown", "No Change Appearance Cooldown", "Removes the cooldown for changing appearance"};
|
||||
}
|
||||
@@ -5,10 +5,8 @@
|
||||
|
||||
namespace YimMenu::Features
|
||||
{
|
||||
// not setting a max speed on purpose to avoid value slider showing up
|
||||
// maybe bring this up as an issue and fix?
|
||||
static FloatCommand _SuperRunMoveRateOverride{"moverateoverride", "Move Rate Override", "Multipler for base run/sprint speed", 0.0f, std::nullopt, 2.0f};
|
||||
static FloatCommand _SuperRunRunSprintMultiplier{"runsprintswimmultiplier", "Run/Sprint/Swim Multiplier", "Multipler with which the run/sprint/swim speed is increased with until maximum speed is reached", 1.0f, std::nullopt, 1.0f};
|
||||
static FloatCommand _SuperRunMoveRateOverride{"moverateoverride", "Move Rate Override", "Multipler for base run/sprint speed", 0.0f, 10.0f, 2.0f};
|
||||
static FloatCommand _SuperRunRunSprintMultiplier{"runsprintswimmultiplier", "Run/Sprint/Swim Multiplier", "Multipler with which the run/sprint/swim speed is increased with until maximum speed is reached", 1.0f, 1.49f, 1.0f};
|
||||
|
||||
class SuperRun : public LoopedCommand
|
||||
{
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
|
||||
namespace YimMenu
|
||||
{
|
||||
FloatCommandItem::FloatCommandItem(joaat_t id, std::optional<std::string> label_override) :
|
||||
FloatCommandItem::FloatCommandItem(joaat_t id, std::optional<std::string> label_override, bool use_slider) :
|
||||
m_useSlider(use_slider),
|
||||
m_Command(Commands::GetCommand<FloatCommand>(id)),
|
||||
m_LabelOverride(label_override)
|
||||
{
|
||||
@@ -20,9 +21,9 @@ namespace YimMenu
|
||||
return;
|
||||
}
|
||||
|
||||
auto value = m_Command->GetState();
|
||||
auto value = m_Command->GetState();
|
||||
auto label = m_LabelOverride.has_value() ? m_LabelOverride.value().c_str() : m_Command->GetLabel().c_str();
|
||||
if (!m_Command->GetMinimum().has_value() || !m_Command->GetMaximum().has_value())
|
||||
if (!m_Command->GetMinimum().has_value() || !m_Command->GetMaximum().has_value() || !m_useSlider)
|
||||
{
|
||||
ImGui::SetNextItemWidth(150);
|
||||
if (ImGui::InputFloat(label, &value))
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
|
||||
namespace YimMenu
|
||||
{
|
||||
IntCommandItem::IntCommandItem(joaat_t id, std::optional<std::string> label_override) :
|
||||
IntCommandItem::IntCommandItem(joaat_t id, std::optional<std::string> label_override, bool use_slider) :
|
||||
m_useSlider(use_slider),
|
||||
m_Command(Commands::GetCommand<IntCommand>(id)),
|
||||
m_LabelOverride(label_override)
|
||||
{
|
||||
@@ -20,9 +21,9 @@ namespace YimMenu
|
||||
return;
|
||||
}
|
||||
|
||||
int value = m_Command->GetState();
|
||||
int value = m_Command->GetState();
|
||||
auto label = m_LabelOverride.has_value() ? m_LabelOverride.value().c_str() : m_Command->GetLabel().c_str();
|
||||
if (!m_Command->GetMinimum().has_value() || !m_Command->GetMaximum().has_value())
|
||||
if (!m_Command->GetMinimum().has_value() || !m_Command->GetMaximum().has_value() || !m_useSlider)
|
||||
{
|
||||
ImGui::SetNextItemWidth(150);
|
||||
if (ImGui::InputInt(label, &value))
|
||||
|
||||
@@ -64,10 +64,11 @@ namespace YimMenu
|
||||
class IntCommandItem : public UIItem
|
||||
{
|
||||
public:
|
||||
explicit IntCommandItem(joaat_t id, std::optional<std::string> label_override = std::nullopt);
|
||||
explicit IntCommandItem(joaat_t id, std::optional<std::string> label_override = std::nullopt, bool use_slider = true);
|
||||
void Draw() override;
|
||||
|
||||
private:
|
||||
bool m_useSlider;
|
||||
IntCommand* m_Command;
|
||||
std::optional<std::string> m_LabelOverride;
|
||||
};
|
||||
@@ -75,10 +76,11 @@ namespace YimMenu
|
||||
class FloatCommandItem : public UIItem
|
||||
{
|
||||
public:
|
||||
explicit FloatCommandItem(joaat_t id, std::optional<std::string> label_override = std::nullopt);
|
||||
explicit FloatCommandItem(joaat_t id, std::optional<std::string> label_override = std::nullopt, bool use_slider = true);
|
||||
void Draw() override;
|
||||
|
||||
private:
|
||||
bool m_useSlider;
|
||||
FloatCommand* m_Command;
|
||||
std::optional<std::string> m_LabelOverride;
|
||||
};
|
||||
|
||||
@@ -22,6 +22,11 @@ namespace YimMenu::Submenus
|
||||
generalGroup->AddItem(std::make_shared<BoolCommandItem>("unlockgtaplus"_J));
|
||||
generalGroup->AddItem(std::make_shared<BoolCommandItem>("overriderpmultiplier"_J));
|
||||
generalGroup->AddItem(std::make_shared<ConditionalItem>("overriderpmultiplier"_J, std::make_shared<FloatCommandItem>("rpmultiplierinput"_J)));
|
||||
|
||||
generalGroup->AddItem(std::make_shared<BoolCommandItem>("freechangeappearance"_J));
|
||||
generalGroup->AddItem(std::make_shared<BoolCommandItem>("nochangeappearancecooldown"_J));
|
||||
generalGroup->AddItem(std::make_shared<BoolCommandItem>("allowgenderchange"_J));
|
||||
|
||||
|
||||
businessGroup->AddItem(std::make_shared<ListCommandItem>("businesssafe"_J));
|
||||
businessGroup->AddItem(std::make_shared<CommandItem>("claimsafeearnings"_J));
|
||||
|
||||
@@ -48,8 +48,8 @@ namespace YimMenu::Submenus
|
||||
movementGroup->AddItem(std::make_shared<BoolCommandItem>("standonvehicles"_J));
|
||||
movementGroup->AddItem(std::make_shared<BoolCommandItem>("disableactionmode"_J));
|
||||
movementGroup->AddItem(std::make_shared<BoolCommandItem>("superrun"_J));
|
||||
movementGroup->AddItem(std::make_shared<ConditionalItem>("superrun"_J, std::make_shared<FloatCommandItem>("moverateoverride"_J)));
|
||||
movementGroup->AddItem(std::make_shared<ConditionalItem>("superrun"_J, std::make_shared<FloatCommandItem>("runsprintswimmultiplier"_J)));
|
||||
movementGroup->AddItem(std::make_shared<ConditionalItem>("superrun"_J, std::make_shared<FloatCommandItem>("moverateoverride"_J, std::nullopt, false)));
|
||||
movementGroup->AddItem(std::make_shared<ConditionalItem>("superrun"_J, std::make_shared<FloatCommandItem>("runsprintswimmultiplier"_J, std::nullopt, false)));
|
||||
movementGroup->AddItem(std::make_shared<BoolCommandItem>("superjump"_J));
|
||||
movementGroup->AddItem(std::make_shared<BoolCommandItem>("noclip"_J));
|
||||
movementGroup->AddItem(std::make_shared<ConditionalItem>("noclip"_J, std::make_shared<FloatCommandItem>("noclipspeed"_J)));
|
||||
|
||||
Reference in New Issue
Block a user