mirror of
https://github.com/YimMenu/YimMenuV2.git
synced 2026-10-11 17:58:10 +08:00
add heist modifier (#181)
* add heist modifier * move cayo perico cooldown into heist tab * fixes - used tunables instead of globals for primary target - removed cayo perico "remove cooldown" as setup gets the job done
This commit is contained in:
1 parent
c8e5143747
commit
6e6e151b92
25 files changed
+1154
-74
No files matched your search
@@ -38,6 +38,12 @@ namespace YimMenu
|
||||
MarkDirty();
|
||||
}
|
||||
|
||||
void ListCommand::SetList(std::vector<std::pair<int, const char*>> list)
|
||||
{
|
||||
m_List = std::move(list);
|
||||
MarkDirty();
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, const char*>>& ListCommand::GetList()
|
||||
{
|
||||
return m_List;
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace YimMenu
|
||||
ListCommand(std::string name, std::string label, std::string description, std::vector<std::pair<int, const char*>> list, int def_val = 0);
|
||||
int GetState();
|
||||
void SetState(int state);
|
||||
void SetList(std::vector<std::pair<int, const char*>> list);
|
||||
std::vector<std::pair<int, const char*>>& GetList();
|
||||
};
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
#include "core/commands/Command.hpp"
|
||||
#include "game/gta/Stats.hpp"
|
||||
|
||||
namespace YimMenu::Features
|
||||
{
|
||||
class CayoPericoCooldown : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
Stats::SetInt("MPX_H4_TARGET_POSIX", 1);
|
||||
Stats::SetInt("MPX_H4_COOLDOWN", 1);
|
||||
Stats::SetInt("MPX_H4_COOLDOWN_HARD", 1);
|
||||
}
|
||||
};
|
||||
|
||||
static CayoPericoCooldown _CayoPericoCooldown{"skipcayocooldown", "Cooldown skip for Cayo Perico Heist", "Skips the cooldown between each Cayo Perico heist"};
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
#include "core/commands/Command.hpp"
|
||||
#include "game/gta/Stats.hpp"
|
||||
|
||||
namespace YimMenu::Features
|
||||
{
|
||||
class CayoPericoSetup : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
Stats::SetInt("MPX_H4CNF_BS_GEN", 131071);
|
||||
Stats::SetInt("MPX_H4CNF_BS_ENTR", 63);
|
||||
Stats::SetInt("MPX_H4CNF_BS_ABIL", 63);
|
||||
Stats::SetInt("MPX_H4CNF_WEAPONS", 2);
|
||||
Stats::SetInt("MPX_H4CNF_WEP_DISRP", 3);
|
||||
Stats::SetInt("MPX_H4CNF_ARM_DISRP", 3);
|
||||
Stats::SetInt("MPX_H4CNF_HEL_DISRP", 3);
|
||||
Stats::SetInt("MPX_H4CNF_TARGET", 5);
|
||||
Stats::SetInt("MPX_H4CNF_TROJAN", 4);
|
||||
Stats::SetInt("MPX_H4CNF_APPROACH", -1);
|
||||
Stats::SetInt("MPX_H4LOOT_CASH_I", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_CASH_C", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_WEED_I", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_WEED_C", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_COKE_I", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_COKE_C", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_GOLD_I", -1);
|
||||
Stats::SetInt("MPX_H4LOOT_GOLD_C", -1);
|
||||
Stats::SetInt("MPX_H4LOOT_PAINT", -1);
|
||||
Stats::SetInt("MPX_H4_PROGRESS", 131055);
|
||||
Stats::SetInt("MPX_H4LOOT_CASH_I_SCOPED", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_CASH_C_SCOPED", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_WEED_I_SCOPED", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_WEED_C_SCOPED", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_COKE_I_SCOPED", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_COKE_C_SCOPED", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_GOLD_I_SCOPED", -1);
|
||||
Stats::SetInt("MPX_H4LOOT_GOLD_C_SCOPED", -1);
|
||||
Stats::SetInt("MPX_H4LOOT_PAINT_SCOPED", -1);
|
||||
Stats::SetInt("MPX_H4_MISSIONS", 65535);
|
||||
Stats::SetInt("MPX_H4_PLAYTHROUGH_STATUS", 40000);
|
||||
}
|
||||
};
|
||||
|
||||
static CayoPericoSetup _CayoPericoSetup{"skipcayosetup", "Setup Cayo Perico Heist", "Gives the best cayo perico loadout."};
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
#include "core/commands/IntCommand.hpp"
|
||||
#include "core/commands/Command.hpp"
|
||||
#include "game/gta/Stats.hpp"
|
||||
#include "game/backend/Players.hpp"
|
||||
#include "game/gta/ScriptGlobal.hpp"
|
||||
#include "game/gta/ScriptLocal.hpp"
|
||||
#include "core/backend/ScriptMgr.hpp"
|
||||
#include "types/script/globals/GlobalPlayerBD.hpp"
|
||||
|
||||
namespace YimMenu::Features
|
||||
{
|
||||
namespace ApartmentHeist
|
||||
{
|
||||
static IntCommand _ApartmentHeistCut1{"apartmentheistcut1", "Player 1", "Player 1 cut", std::nullopt, std::nullopt, 0};
|
||||
static IntCommand _ApartmentHeistCut2{"apartmentheistcut2", "Player 2", "Player 2 cut", std::nullopt, std::nullopt, 0};
|
||||
static IntCommand _ApartmentHeistCut3{"apartmentheistcut3", "Player 3", "Player 3 cut", std::nullopt, std::nullopt, 0};
|
||||
static IntCommand _ApartmentHeistCut4{"apartmentheistcut4", "Player 4", "Player 4 cut", std::nullopt, std::nullopt, 0};
|
||||
|
||||
class SetCuts : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
auto base1 = ScriptGlobal(1929794).At(1);
|
||||
auto base2 = ScriptGlobal(1931762).At(3008);
|
||||
|
||||
*base1.At(1).As<int*>() = 100 - (_ApartmentHeistCut1.GetState() + _ApartmentHeistCut2.GetState() + _ApartmentHeistCut3.GetState() + _ApartmentHeistCut4.GetState());
|
||||
*base1.At(2).As<int*>() = _ApartmentHeistCut2.GetState();
|
||||
*base1.At(3).As<int*>() = _ApartmentHeistCut3.GetState();
|
||||
*base1.At(4).As<int*>() = _ApartmentHeistCut4.GetState();
|
||||
|
||||
ScriptMgr::Yield(500ms);
|
||||
|
||||
*base2.At(1).As<int*>() = -1 * (*base1.At(1).As<int*>() + *base1.At(2).As<int*>() + *base1.At(3).As<int*>() + *base1.At(4).As<int*>() - 100);
|
||||
*base2.At(2).As<int*>() = *base1.At(2).As<int*>();
|
||||
*base2.At(3).As<int*>() = *base1.At(3).As<int*>();
|
||||
*base2.At(4).As<int*>() = *base1.At(4).As<int*>();
|
||||
}
|
||||
};
|
||||
|
||||
class ForceReady : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
if (auto gpbd = GlobalPlayerBD::Get(); gpbd && Scripts::SafeToModifyFreemodeBroadcastGlobals())
|
||||
{
|
||||
for (auto& player : Players::GetPlayers())
|
||||
{
|
||||
gpbd->Entries[player.second.GetId()].HeistCutSelectionStage = 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class Setup : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
Stats::SetInt("MPX_HEIST_PLANNING_STAGE", -1);
|
||||
}
|
||||
};
|
||||
|
||||
class SkipHacking : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
*ScriptLocal("fm_mission_controller"_J, 12216).At(24).As<int*>() = 7;
|
||||
*ScriptLocal("fm_mission_controller"_J, 10213).As<int*>() = *ScriptLocal("fm_mission_controller"_J, 10213).As<int*>() | (1 << 9);
|
||||
}
|
||||
};
|
||||
|
||||
class SkipDrilling : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
*ScriptLocal("fm_mission_controller"_J, 10507).At(11).As<float*>() = 100.0f;
|
||||
}
|
||||
};
|
||||
|
||||
class InstantFinish : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
Scripts::ForceScriptHost(Scripts::FindScriptThread("fm_mission_controller"_J));
|
||||
ScriptMgr::Yield(500ms);
|
||||
|
||||
*ScriptLocal("fm_mission_controller"_J, 20387).At(1725).At(1).As<int*>() = 80;
|
||||
*ScriptLocal("fm_mission_controller"_J, 20387).As<int*>() = 12;
|
||||
*ScriptLocal("fm_mission_controller"_J, 29006).At(1).As<int*>() = 99999;
|
||||
*ScriptLocal("fm_mission_controller"_J, 32462).At(1).At(68).As<int*>() = 99999;
|
||||
|
||||
// TODO: find a way of getting current heist info so that InstantFinishPacific can be implemented here conditionally.
|
||||
}
|
||||
};
|
||||
|
||||
class InstantFinishPacific : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
Scripts::ForceScriptHost(Scripts::FindScriptThread("fm_mission_controller"_J));
|
||||
ScriptMgr::Yield(500ms);
|
||||
|
||||
*ScriptLocal("fm_mission_controller"_J, 20387).At(2686).As<int*>() = 1875000;
|
||||
*ScriptLocal("fm_mission_controller"_J, 20387).At(1062).As<int*>() = 5;
|
||||
*ScriptLocal("fm_mission_controller"_J, 20387).As<int*>() = 12;
|
||||
*ScriptLocal("fm_mission_controller"_J, 29006).At(1).As<int*>() = 99999;
|
||||
*ScriptLocal("fm_mission_controller"_J, 32462).At(1).At(68).As<int*>() = 99999;
|
||||
}
|
||||
};
|
||||
|
||||
static SetCuts _ApartmentHeistSetCuts{"apartmentheistsetcuts", "Set Cuts", "Sets heist cut"};
|
||||
static ForceReady _ApartmentHeistForceReady{"apartmentheistforceready", "Force Ready", "Forces all players to be ready"};
|
||||
static Setup _ApartmentHeistSetup{"apartmentheistsetup", "Setup", "Sets up current apartment heist"};
|
||||
static SkipHacking _ApartmentHeistSkipHacking{"apartmentheistskiphacking", "Skip Hacking", "Skips hacking process"};
|
||||
static SkipDrilling _ApartmentHeistSkipDrilling{"apartmentheistskipdrilling", "Skip Drilling", "Skips drilling process"};
|
||||
static InstantFinish _ApartmentHeistInstantFinish{"apartmentheistinstantfinish", "Instant Finish", "Instantly passes the heist"};
|
||||
static InstantFinishPacific _ApartmentHeistInstantFinishPacific{"apartmentheistinstantfinishpacific", "Instant Finish (Pacific)", "Instantly passes Pacific Standard Job"};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,257 @@
|
||||
#include "core/commands/Command.hpp"
|
||||
#include "core/commands/IntCommand.hpp"
|
||||
#include "core/commands/ListCommand.hpp"
|
||||
#include "game/backend/Self.hpp"
|
||||
#include "game/gta/Natives.hpp"
|
||||
#include "game/gta/Stats.hpp"
|
||||
#include "game/gta/ScriptGlobal.hpp"
|
||||
#include "game/gta/ScriptLocal.hpp"
|
||||
#include "core/backend/ScriptMgr.hpp"
|
||||
#include "game/backend/Tunables.hpp"
|
||||
|
||||
namespace YimMenu::Features
|
||||
{
|
||||
namespace CayoPericoHeist
|
||||
{
|
||||
static IntCommand _CayoPericoHeistCut1{"cayopericoheistcut1", "Player 1", "Player 1 cut", std::nullopt, std::nullopt, 0};
|
||||
static IntCommand _CayoPericoHeistCut2{"cayopericoheistcut2", "Player 2", "Player 2 cut", std::nullopt, std::nullopt, 0};
|
||||
static IntCommand _CayoPericoHeistCut3{"cayopericoheistcut3", "Player 3", "Player 3 cut", std::nullopt, std::nullopt, 0};
|
||||
static IntCommand _CayoPericoHeistCut4{"cayopericoheistcut4", "Player 4", "Player 4 cut", std::nullopt, std::nullopt, 0};
|
||||
|
||||
class SetCuts : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
auto base = ScriptGlobal(1973698).At(831).At(56);
|
||||
|
||||
*base.At(1).As<int*>() = _CayoPericoHeistCut1.GetState();
|
||||
*base.At(2).As<int*>() = _CayoPericoHeistCut2.GetState();
|
||||
*base.At(3).As<int*>() = _CayoPericoHeistCut3.GetState();
|
||||
*base.At(4).As<int*>() = _CayoPericoHeistCut4.GetState();
|
||||
}
|
||||
};
|
||||
|
||||
class ForceReady : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
auto base = ScriptGlobal(1974810);
|
||||
|
||||
*base.At(0, 27).At(8).At(0).As<int*>() = 1;
|
||||
*base.At(1, 27).At(8).At(1).As<int*>() = 1;
|
||||
*base.At(2, 27).At(8).At(2).As<int*>() = 1;
|
||||
*base.At(3, 27).At(8).At(3).As<int*>() = 1;
|
||||
}
|
||||
};
|
||||
|
||||
static std::vector<std::pair<int, const char*>> cayoPericoHeistDifficulty = {
|
||||
{126823, "Normal"},
|
||||
{131055, "Hard"}
|
||||
};
|
||||
static ListCommand _CayoPericoHeistDifficulty{"cayopericoheistdifficulty", "Difficulty", "Heist difficulty", cayoPericoHeistDifficulty, 126823};
|
||||
|
||||
static std::vector<std::pair<int, const char*>> cayoPericoHeistPrimaryTarget = {
|
||||
{5, "Panther Statue"},
|
||||
{3, "Pink Diamond"},
|
||||
{4, "Madrazo Files"},
|
||||
{2, "Bearer Bonds"},
|
||||
{1, "Ruby Necklace"},
|
||||
{0, "Sinsimito Tequila"}
|
||||
};
|
||||
static ListCommand _CayoPericoHeistPrimaryTarget{"cayopericoheistprimarytarget", "Primary Target", "Primary target", cayoPericoHeistPrimaryTarget, 5};
|
||||
|
||||
static std::vector<std::pair<int, const char*>> cayoPericoHeistWeapon = {
|
||||
{1, "Aggressor"},
|
||||
{2, "Conspirator"},
|
||||
{3, "Crack Shot"},
|
||||
{4, "Saboteur"},
|
||||
{5, "Marksman"}
|
||||
};
|
||||
static ListCommand _CayoPericoHeistWeapon{"cayopericoheistweapon", "Weapon", "Weapon category", cayoPericoHeistWeapon, 1};
|
||||
|
||||
class Setup : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
Stats::SetInt("MPX_H4CNF_TARGET", _CayoPericoHeistPrimaryTarget.GetState()); // Primary target
|
||||
Stats::SetInt("MPX_H4LOOT_CASH_I", 2359448);
|
||||
Stats::SetInt("MPX_H4LOOT_CASH_I_SCOPED", 2359448);
|
||||
Stats::SetInt("MPX_H4LOOT_CASH_C", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_CASH_C_SCOPED", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_COKE_I", 4901222);
|
||||
Stats::SetInt("MPX_H4LOOT_COKE_I_SCOPED", 4901222);
|
||||
Stats::SetInt("MPX_H4LOOT_COKE_C", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_COKE_C_SCOPED", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_GOLD_I", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_GOLD_I_SCOPED", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_GOLD_C", 255);
|
||||
Stats::SetInt("MPX_H4LOOT_GOLD_C_SCOPED", 255);
|
||||
Stats::SetInt("MPX_H4LOOT_WEED_I", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_WEED_I_SCOPED", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_WEED_C", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_WEED_C_SCOPED", 0);
|
||||
Stats::SetInt("MPX_H4LOOT_PAINT", 127);
|
||||
Stats::SetInt("MPX_H4LOOT_PAINT_SCOPED", 127);
|
||||
Stats::SetInt("MPX_H4LOOT_CASH_V", 599431);
|
||||
Stats::SetInt("MPX_H4LOOT_COKE_V", 1198863);
|
||||
Stats::SetInt("MPX_H4LOOT_GOLD_V", 1598484);
|
||||
Stats::SetInt("MPX_H4LOOT_PAINT_V", 1198863);
|
||||
Stats::SetInt("MPX_H4LOOT_WEED_V", 0);
|
||||
Stats::SetInt("MPX_H4_PROGRESS", _CayoPericoHeistDifficulty.GetState()); // Difficulty
|
||||
Stats::SetInt("MPX_H4CNF_BS_GEN", 262143);
|
||||
Stats::SetInt("MPX_H4CNF_BS_ENTR", 63);
|
||||
Stats::SetInt("MPX_H4CNF_BS_ABIL", 63);
|
||||
Stats::SetInt("MPX_H4CNF_WEP_DISRP", 3);
|
||||
Stats::SetInt("MPX_H4CNF_ARM_DISRP", 3);
|
||||
Stats::SetInt("MPX_H4CNF_HEL_DISRP", 3);
|
||||
Stats::SetInt("MPX_H4CNF_APPROACH", -1);
|
||||
Stats::SetInt("MPX_H4CNF_BOLTCUT", 4424);
|
||||
Stats::SetInt("MPX_H4CNF_UNIFORM", 5256);
|
||||
Stats::SetInt("MPX_H4CNF_GRAPPEL", 5156);
|
||||
Stats::SetInt("MPX_H4_MISSIONS", -1);
|
||||
Stats::SetInt("MPX_H4CNF_WEAPONS", _CayoPericoHeistWeapon.GetState()); // Weapon
|
||||
Stats::SetInt("MPX_H4CNF_TROJAN", 5);
|
||||
Stats::SetInt("MPX_H4_PLAYTHROUGH_STATUS", 100);
|
||||
|
||||
ScriptMgr::Yield(500ms);
|
||||
|
||||
*ScriptLocal("heist_island_planning"_J, 1566).As<int*>() = 2;
|
||||
}
|
||||
};
|
||||
|
||||
static IntCommand _CayoPericoHeistPrimaryTargetValue{"cayopericoheistprimarytargetvalue", "Primary Target Value", "Updates primary target value", std::nullopt, std::nullopt, 0};
|
||||
|
||||
class SetPrimaryTargetValue : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
auto primary_target = Stats::GetInt("MPX_H4CNF_TARGET");
|
||||
|
||||
switch (primary_target)
|
||||
{
|
||||
case 0: *Tunables::GetTunable("IH_PRIMARY_TARGET_VALUE_TEQUILA"_J).As<int*>() = _CayoPericoHeistPrimaryTargetValue.GetState(); break;
|
||||
case 1: *Tunables::GetTunable("IH_PRIMARY_TARGET_VALUE_PEARL_NECKLACE"_J).As<int*>() = _CayoPericoHeistPrimaryTargetValue.GetState(); break;
|
||||
case 2: *Tunables::GetTunable("IH_PRIMARY_TARGET_VALUE_BEARER_BONDS"_J).As<int*>() = _CayoPericoHeistPrimaryTargetValue.GetState(); break;
|
||||
case 3: *Tunables::GetTunable("IH_PRIMARY_TARGET_VALUE_PINK_DIAMOND"_J).As<int*>() = _CayoPericoHeistPrimaryTargetValue.GetState(); break;
|
||||
case 4: *Tunables::GetTunable("IH_PRIMARY_TARGET_VALUE_MADRAZO_FILES"_J).As<int*>() = _CayoPericoHeistPrimaryTargetValue.GetState(); break;
|
||||
case 5: *Tunables::GetTunable("IH_PRIMARY_TARGET_VALUE_SAPPHIRE_PANTHER_STATUE"_J).As<int*>() = _CayoPericoHeistPrimaryTargetValue.GetState(); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static IntCommand _CayoPericoHeistSecondaryTakeValue{"cayopericoheistsecondarytakevalue", "Secondary Take Value", "Updates secondary take value", std::nullopt, std::nullopt, 0};
|
||||
|
||||
class SetSecondaryTakeValue : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
*ScriptLocal("fm_mission_controller_2020"_J, 56033).At(1518).At(53).As<int*>() = _CayoPericoHeistSecondaryTakeValue.GetState();
|
||||
}
|
||||
};
|
||||
|
||||
class SkipHacking : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
*ScriptLocal("fm_mission_controller_2020"_J, 25388).As<int*>() = 5;
|
||||
}
|
||||
};
|
||||
|
||||
class CutSewer : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
*ScriptLocal("fm_mission_controller_2020"_J, 30212).As<int*>() = 6;
|
||||
}
|
||||
};
|
||||
|
||||
class CutGlass : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
*ScriptLocal("fm_mission_controller_2020"_J, 31451).At(3).As<float*>() = 100.0f;
|
||||
}
|
||||
};
|
||||
|
||||
class TakePrimaryTarget : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
auto ped = Self::GetPed();
|
||||
|
||||
if (!ped)
|
||||
return;
|
||||
|
||||
auto pos = ped.GetPosition();
|
||||
auto heading = ped.GetHeading();
|
||||
auto primary_target = Stats::GetInt("MPX_H4CNF_TARGET");
|
||||
|
||||
TASK::TASK_GO_STRAIGHT_TO_COORD(ped.GetHandle(), 5006.917, -5755.931, 15.484, 1.0, 3, 15, 5);
|
||||
|
||||
switch (primary_target)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
case 3:
|
||||
case 5:
|
||||
*ScriptLocal("fm_mission_controller_2020"_J, 31450).As<int*>() = 5;
|
||||
*ScriptLocal("fm_mission_controller_2020"_J, 31451).As<int*>() = 3;
|
||||
break;
|
||||
case 2:
|
||||
case 4:
|
||||
*ScriptLocal("fm_mission_controller_2020"_J, 31426).As<int*>() = 7;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
ScriptMgr::Yield(4000ms);
|
||||
|
||||
TASK::TASK_GO_STRAIGHT_TO_COORD(ped.GetHandle(), pos.x, pos.y, pos.z, 1.0, 3, heading, 5);
|
||||
}
|
||||
};
|
||||
|
||||
class InstantFinish : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
Scripts::ForceScriptHost(Scripts::FindScriptThread("fm_mission_controller_2020"_J));
|
||||
ScriptMgr::Yield(500ms);
|
||||
|
||||
*ScriptLocal("fm_mission_controller_2020"_J, 52581).As<int*>() = 9;
|
||||
*ScriptLocal("fm_mission_controller_2020"_J, 52581).At(1776).At(1).As<int*>() = 50;
|
||||
}
|
||||
};
|
||||
|
||||
static SetCuts _CayoPericoHeistSetCuts{"cayopericoheistsetcuts", "Set Cuts", "Sets heist cut"};
|
||||
static ForceReady _CayoPericoHeistForceReady{"cayopericoheistforceready", "Force Ready", "Forces all players to be ready"};
|
||||
static Setup _CayoPericoHeistSetup{"cayopericoheistsetup", "Setup", "Sets up cayo perico heist"};
|
||||
static SetPrimaryTargetValue _CayoPericoHeistSetPrimaryTargetValue{"cayopericoheistsetprimarytargetvalue", "Set Primary Target Value", "Updates primary target value"};
|
||||
static SetSecondaryTakeValue _CayoPericoHeistSetSecondaryTakeValue{"cayopericoheistsetsecondarytakevalue", "Set Secondary Take Value", "Updates secondary take value"};
|
||||
static SkipHacking _CayoPericoHeistSkipHacking{"cayopericoheistskiphacking", "Skip Hacking", "Skips hacking process"};
|
||||
static CutSewer _CayoPericoHeistCutSewer{"cayopericoheistcutsewer", "Cut Sewer", "Cuts the sewer"};
|
||||
static CutGlass _CayoPericoHeistCutGlass{"cayopericoheistcutglass", "Cut Glass", "Cuts the glass"};
|
||||
static TakePrimaryTarget _CayoPericoHeistTakePrimaryTarget{"cayopericoheisttakeprimarytarget", "Take Primary Target", "Takes primary target"};
|
||||
static InstantFinish _CayoPericoHeistInstantFinish{"cayopericoheistinstantfinish", "Instant Finish", "Instantly passes the heist"};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,333 @@
|
||||
#include "core/commands/Command.hpp"
|
||||
#include "core/commands/IntCommand.hpp"
|
||||
#include "core/commands/ListCommand.hpp"
|
||||
#include "game/gta/Stats.hpp"
|
||||
#include "core/backend/FiberPool.hpp"
|
||||
#include "game/gta/ScriptGlobal.hpp"
|
||||
#include "game/gta/ScriptLocal.hpp"
|
||||
#include "core/backend/ScriptMgr.hpp"
|
||||
#include "game/backend/Tunables.hpp"
|
||||
|
||||
namespace YimMenu::Features
|
||||
{
|
||||
namespace DiamondCasinoHeist
|
||||
{
|
||||
static IntCommand _DiamondCasinoHeistCut1{"diamondcasinoheistcut1", "Player 1", "Player 1 cut", std::nullopt, std::nullopt, 0};
|
||||
static IntCommand _DiamondCasinoHeistCut2{"diamondcasinoheistcut2", "Player 2", "Player 2 cut", std::nullopt, std::nullopt, 0};
|
||||
static IntCommand _DiamondCasinoHeistCut3{"diamondcasinoheistcut3", "Player 3", "Player 3 cut", std::nullopt, std::nullopt, 0};
|
||||
static IntCommand _DiamondCasinoHeistCut4{"diamondcasinoheistcut4", "Player 4", "Player 4 cut", std::nullopt, std::nullopt, 0};
|
||||
|
||||
class SetCuts : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
auto base = ScriptGlobal(1966898).At(1497).At(736).At(92);
|
||||
|
||||
*base.At(1).As<int*>() = _DiamondCasinoHeistCut1.GetState();
|
||||
*base.At(2).As<int*>() = _DiamondCasinoHeistCut2.GetState();
|
||||
*base.At(3).As<int*>() = _DiamondCasinoHeistCut3.GetState();
|
||||
*base.At(4).As<int*>() = _DiamondCasinoHeistCut4.GetState();
|
||||
}
|
||||
};
|
||||
|
||||
class ForceReady : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
auto base = ScriptGlobal(1971261);
|
||||
|
||||
*base.At(0, 68).At(8).At(0).As<int*>() = 1;
|
||||
*base.At(1, 68).At(8).At(1).As<int*>() = 1;
|
||||
*base.At(2, 68).At(8).At(2).As<int*>() = 1;
|
||||
*base.At(3, 68).At(8).At(3).As<int*>() = 1;
|
||||
}
|
||||
};
|
||||
|
||||
static std::vector<std::pair<int, const char*>> diamondCasinoHeistDifficulty = {
|
||||
{0, "Normal"},
|
||||
{1, "Hard"}
|
||||
};
|
||||
static ListCommand _DiamondCasinoHeistDifficulty{"diamondcasinoheistdifficulty", "Difficulty", "Heist difficulty", diamondCasinoHeistDifficulty, 0};
|
||||
|
||||
static std::vector<std::pair<int, const char*>> diamondCasinoHeistPrimaryTarget = {
|
||||
{3, "Diamonds"},
|
||||
{1, "Gold"},
|
||||
{2, "Artwork"},
|
||||
{0, "Cash"}
|
||||
};
|
||||
static ListCommand _DiamondCasinoHeistPrimaryTarget{"diamondcasinoheistprimarytarget", "Primary Target", "Primary target", diamondCasinoHeistPrimaryTarget, 3};
|
||||
|
||||
static ListCommand* _DiamondCasinoHeistGunmanPtr = nullptr;
|
||||
static ListCommand* _DiamondCasinoHeistApproachPtr = nullptr;
|
||||
|
||||
static std::vector<std::vector<std::vector<std::pair<int, const char*>>>> diamondCasinoHeistWeapon = {
|
||||
{
|
||||
{{0, "MK II Shotgun Loadout"}, {1, "MK II Rifle Loadout"}},
|
||||
{{0, "MK II SMG Loadout"}, {1, "MK II Rifle Loadout"}},
|
||||
{{0, "MK II Shotgun Loadout"}, {1, "MK II Rifle Loadout"}}
|
||||
},
|
||||
{
|
||||
{{0, "Rifle Loadout"}, {1, "Shotgun Loadout"}},
|
||||
{{0, "Rifle Loadout"}, {1, "Shotgun Loadout"}},
|
||||
{{0, "Rifle Loadout"}, {1, "Shotgun Loadout"}}
|
||||
},
|
||||
{
|
||||
{{0, "Combat PDW Loadout"}, {1, "Rifle Loadout"}},
|
||||
{{0, "Shotgun Loadout"}, {1, "Rifle Loadout"}},
|
||||
{{0, "Shotgun Loadout"}, {1, "Combat MG Loadout"}}
|
||||
},
|
||||
{
|
||||
{{0, "SMG Loadout"}, {1, "Shotgun Loadout"}},
|
||||
{{0, "Machine Pistol Loadout"}, {1, "Shotgun Loadout"}},
|
||||
{{0, "SMG Loadout"}, {1, "Shotgun Loadout"}}
|
||||
},
|
||||
{
|
||||
{{0, "Micro SMG Loadout"}, {1, "Machine Pistol Loadout"}},
|
||||
{{0, "Micro SMG Loadout"}, {1, "Shotgun Loadout"}},
|
||||
{{0, "Shotgun Loadout"}, {1, "Revolver Loadout"}}
|
||||
},
|
||||
{
|
||||
{{0, " "}, {1, ""}},
|
||||
{{0, ""}, {1, ""}},
|
||||
{{0, ""}, {1, ""}}
|
||||
}
|
||||
};
|
||||
static ListCommand _DiamondCasinoHeistWeapon{"diamondcasinoheistweapon", "Weapon", "Weapon", diamondCasinoHeistWeapon[5][0], 0};
|
||||
|
||||
static std::vector<std::pair<int, const char*>> diamondCasinoHeistGunman = {
|
||||
{0, "Chester McCoy"},
|
||||
{1, "Gustavo Mota"},
|
||||
{2, "Patrick McReary"},
|
||||
{3, "Charlie Reed"},
|
||||
{4, "Karl Abolaji"},
|
||||
{5, "Remove Gunman"}
|
||||
};
|
||||
|
||||
class Gunman : public ListCommand
|
||||
{
|
||||
using ListCommand::ListCommand;
|
||||
|
||||
virtual void OnChange() override
|
||||
{
|
||||
_DiamondCasinoHeistWeapon.SetList(diamondCasinoHeistWeapon[this->GetState()][_DiamondCasinoHeistApproachPtr->GetState()]);
|
||||
_DiamondCasinoHeistWeapon.SetState(0);
|
||||
}
|
||||
};
|
||||
static Gunman _DiamondCasinoHeistGunman{"diamondcasinoheistgunman", "Gunman", "Gunman", diamondCasinoHeistGunman, 5};
|
||||
|
||||
static std::vector<std::pair<int, const char*>> diamondCasinoHeistApproach = {
|
||||
{0, "Silent & Sneaky"},
|
||||
{1, "The Big Con"},
|
||||
{2, "Aggressive"}
|
||||
};
|
||||
|
||||
class Approach : public ListCommand
|
||||
{
|
||||
using ListCommand::ListCommand;
|
||||
|
||||
virtual void OnChange() override
|
||||
{
|
||||
_DiamondCasinoHeistWeapon.SetList(diamondCasinoHeistWeapon[_DiamondCasinoHeistGunmanPtr->GetState()][this->GetState()]);
|
||||
_DiamondCasinoHeistWeapon.SetState(0);
|
||||
}
|
||||
};
|
||||
static Approach _DiamondCasinoHeistApproach{"diamondcasinoheistapproach", "Approach", "Heist approach", diamondCasinoHeistApproach, 0};
|
||||
|
||||
static struct InitPtrs
|
||||
{
|
||||
InitPtrs()
|
||||
{
|
||||
_DiamondCasinoHeistGunmanPtr = &_DiamondCasinoHeistGunman;
|
||||
_DiamondCasinoHeistApproachPtr = &_DiamondCasinoHeistApproach;
|
||||
}
|
||||
} _initPtrs;
|
||||
|
||||
static std::vector<std::vector<std::pair<int, const char*>>> diamondCasinoHeistVehicle = {
|
||||
{{0, "Zhaba"}, {1, "Vagrant"}, {2, "Outlaw"}, {3, "Everon"}},
|
||||
{{0, "Sultan Classic"}, {1, "Gauntlet Classic"}, {2, "Ellie"}, {3, "Komoda"}},
|
||||
{{0, "Retinue MK II"}, {1, "Drifty Yosemite"}, {2, "Sugoi"}, {3, "Jugular"}},
|
||||
{{0, "Manchez"}, {1, "Stryder"}, {2, "Defiler"}, {3, "Lectro"}},
|
||||
{{0, "Issi Classic"}, {1, "Asbo"}, {2, "Kanjo"}, {3, "Sentinel Classic"}},
|
||||
{{0, " "}, {1, ""}, {2, ""}, {3, ""}}
|
||||
};
|
||||
static ListCommand _DiamondCasinoHeistVehicle{"diamondcasinoheistvehicle", "Vehicle", "Vehicle", diamondCasinoHeistVehicle[5], 0};
|
||||
|
||||
static std::vector<std::pair<int, const char*>> diamondCasinoHeistDriver = {
|
||||
{0, "Chester McCoy"},
|
||||
{1, "Eddie Toh"},
|
||||
{2, "Taliana Martinez"},
|
||||
{3, "Zach Nelson"},
|
||||
{4, "Karim Denz"},
|
||||
{5, "Remove Driver"}
|
||||
};
|
||||
|
||||
class Driver : public ListCommand
|
||||
{
|
||||
using ListCommand::ListCommand;
|
||||
|
||||
virtual void OnChange() override
|
||||
{
|
||||
_DiamondCasinoHeistVehicle.SetList(diamondCasinoHeistVehicle[this->GetState()]);
|
||||
_DiamondCasinoHeistVehicle.SetState(0);
|
||||
}
|
||||
};
|
||||
static Driver _DiamondCasinoHeistDriver{"diamondcasinoheistdriver", "Driver", "Driver", diamondCasinoHeistDriver, 5};
|
||||
|
||||
static std::vector<std::pair<int, const char*>> diamondCasinoHeistHacker = {
|
||||
{4, "Avi Schwartzman"},
|
||||
{5, "Paige Harris"},
|
||||
{2, "Christian Feltz"},
|
||||
{3, "Yohan Blair"},
|
||||
{1, "Rickie Lukens"},
|
||||
{6, "Remove Hacker"}
|
||||
};
|
||||
static ListCommand _DiamondCasinoHeistHacker{"diamondcasinoheisthacker", "Hacker", "Hacker", diamondCasinoHeistHacker, 6};
|
||||
|
||||
class Setup : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
Stats::SetInt("MPX_H3_COMPLETEDPOSIX", -1);
|
||||
Stats::SetInt("MPX_H3OPT_MASKS", 4);
|
||||
Stats::SetInt("MPX_H3OPT_WEAPS", _DiamondCasinoHeistWeapon.GetState());
|
||||
Stats::SetInt("MPX_H3OPT_VEHS", _DiamondCasinoHeistVehicle.GetState());
|
||||
Stats::SetInt("MPX_CAS_HEIST_FLOW", -1);
|
||||
Stats::SetInt("MPX_H3_LAST_APPROACH", 0);
|
||||
Stats::SetInt("MPX_H3OPT_APPROACH", _DiamondCasinoHeistApproach.GetState() + 1); // 1 = Silent & Sneaky, 2 = The Big Con, 3 = Aggressive
|
||||
|
||||
switch (_DiamondCasinoHeistDifficulty.GetState())
|
||||
{
|
||||
case 0: Stats::SetInt("MPX_H3_HARD_APPROACH", 0); break;
|
||||
case 1: Stats::SetInt("MPX_H3_HARD_APPROACH", _DiamondCasinoHeistApproach.GetState() + 1); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
Stats::SetInt("MPX_H3OPT_TARGET", _DiamondCasinoHeistPrimaryTarget.GetState());
|
||||
Stats::SetInt("MPX_H3OPT_POI", 1023);
|
||||
Stats::SetInt("MPX_H3OPT_ACCESSPOINTS", 2047);
|
||||
|
||||
switch (_DiamondCasinoHeistGunman.GetState())
|
||||
{
|
||||
case 0: Stats::SetInt("MPX_H3OPT_CREWWEAP", 4); break;
|
||||
case 1: Stats::SetInt("MPX_H3OPT_CREWWEAP", 2); break;
|
||||
case 2: Stats::SetInt("MPX_H3OPT_CREWWEAP", 5); break;
|
||||
case 3: Stats::SetInt("MPX_H3OPT_CREWWEAP", 3); break;
|
||||
case 4: Stats::SetInt("MPX_H3OPT_CREWWEAP", 1); break;
|
||||
case 5: Stats::SetInt("MPX_H3OPT_CREWWEAP", 6); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
switch (_DiamondCasinoHeistDriver.GetState())
|
||||
{
|
||||
case 0: Stats::SetInt("MPX_H3OPT_CREWDRIVER", 5); break;
|
||||
case 1: Stats::SetInt("MPX_H3OPT_CREWDRIVER", 3); break;
|
||||
case 2: Stats::SetInt("MPX_H3OPT_CREWDRIVER", 2); break;
|
||||
case 3: Stats::SetInt("MPX_H3OPT_CREWDRIVER", 4); break;
|
||||
case 4: Stats::SetInt("MPX_H3OPT_CREWDRIVER", 1); break;
|
||||
case 5: Stats::SetInt("MPX_H3OPT_CREWDRIVER", 6); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
Stats::SetInt("MPX_H3OPT_CREWHACKER", _DiamondCasinoHeistHacker.GetState());
|
||||
Stats::SetInt("MPX_H3OPT_DISRUPTSHIP", 3); // Security Strength: 1 = Strong, 2 = Medium, 3 = Weak
|
||||
Stats::SetInt("MPX_H3OPT_BODYARMORLVL", -1);
|
||||
Stats::SetInt("MPX_H3OPT_KEYLEVELS", 2); // 1 = Level1 Security Pass, 2 = Level2 Security Pass
|
||||
|
||||
Stats::SetInt("MPX_H3OPT_BITSET0", rand() % (INT_MAX)); // Refresh board
|
||||
Stats::SetInt("MPX_H3OPT_BITSET1", rand() % (INT_MAX)); // Refresh board
|
||||
|
||||
ScriptMgr::Yield(500ms);
|
||||
|
||||
Stats::SetInt("MPX_H3OPT_BITSET0", -1); // Refresh board
|
||||
Stats::SetInt("MPX_H3OPT_BITSET1", -1); // Refresh board
|
||||
}
|
||||
};
|
||||
|
||||
static IntCommand _DiamondCasinoHeistPotentialTake{"diamondcasinoheistpotentialtake", "Potential Take", "Updates potential take", std::nullopt, std::nullopt, 0};
|
||||
|
||||
class SetPotentialTake : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
int primary_target = Stats::GetInt("MPX_H3OPT_TARGET");
|
||||
|
||||
switch (primary_target)
|
||||
{
|
||||
case 0: *Tunables::GetTunable(static_cast<joaat_t>(-1638885821)).As<int*>() = _DiamondCasinoHeistPotentialTake.GetState(); break; // "Cash"
|
||||
case 1: *Tunables::GetTunable(static_cast<joaat_t>(-582734553)).As<int*>() = _DiamondCasinoHeistPotentialTake.GetState(); break; // "Gold"
|
||||
case 2: *Tunables::GetTunable(static_cast<joaat_t>(1934398910)).As<int*>() = _DiamondCasinoHeistPotentialTake.GetState(); break; // "Artwork"
|
||||
case 3: *Tunables::GetTunable(static_cast<joaat_t>(1277889925)).As<int*>() = _DiamondCasinoHeistPotentialTake.GetState(); break; // "Diamond"
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static IntCommand _DiamondCasinoHeistActualTake{"diamondcasinoheistactualtake", "Actual Take", "Updates actual take", std::nullopt, std::nullopt, 0};
|
||||
|
||||
class SetActualTake : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
*ScriptLocal("fm_mission_controller"_J, 20387).At(2686).As<int*>() = _DiamondCasinoHeistActualTake.GetState();
|
||||
}
|
||||
};
|
||||
|
||||
class SkipHacking : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
*ScriptLocal("fm_mission_controller"_J, 53999).As<int*>() = 5;
|
||||
*ScriptLocal("fm_mission_controller"_J, 55065).As<int*>() = 5;
|
||||
}
|
||||
};
|
||||
|
||||
class SkipDrilling : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
*ScriptLocal("fm_mission_controller"_J, 10547).At(7).As<int*>() = *ScriptLocal("fm_mission_controller"_J, 10547).At(37).As<int*>();
|
||||
}
|
||||
};
|
||||
|
||||
class InstantFinish : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
Scripts::ForceScriptHost(Scripts::FindScriptThread("fm_mission_controller"_J));
|
||||
ScriptMgr::Yield(500ms);
|
||||
|
||||
*ScriptLocal("fm_mission_controller"_J, 20387).At(1740).At(1).As<int*>() = 80;
|
||||
*ScriptLocal("fm_mission_controller"_J, 20387).At(2686).As<int*>() = 4443220;
|
||||
*ScriptLocal("fm_mission_controller"_J, 20387).At(1062).As<int*>() = 5;
|
||||
*ScriptLocal("fm_mission_controller"_J, 20387).As<int*>() = 12;
|
||||
*ScriptLocal("fm_mission_controller"_J, 29006).At(1).As<int*>() = 99999;
|
||||
*ScriptLocal("fm_mission_controller"_J, 32462).At(1).At(68).As<int*>() = 99999;
|
||||
}
|
||||
};
|
||||
|
||||
static SetCuts _DiamondCasinoHeistSetCuts{"diamondcasinoheistsetcuts", "Set Cuts", "Sets heist cut"};
|
||||
static ForceReady _DiamondCasinoHeistForceReady{"diamondcasinoheistforceready", "Force Ready", "Forces all players to be ready"};
|
||||
static Setup _DiamondCasinoHeistSetup{"diamondcasinoheistsetup", "Setup", "Sets up diamond casino heist"};
|
||||
static SetPotentialTake _DiamondCasinoHeistSetPotentialTake{"diamondcasinoheistsetpotentialtake", "Set Potential Take", "Updates potential take"};
|
||||
static SetActualTake _DiamondCasinoHeistSetActualTake{"diamondcasinoheistsetactualtake", "Set Actual Take", "Updates actual take"};
|
||||
static SkipHacking _DiamondCasinoHeistSkipHacking{"diamondcasinoheistskiphacking", "Skip Hacking", "Skips hacking process"};
|
||||
static SkipDrilling _DiamondCasinoHeistSkipDrilling{"diamondcasinoheistskipdrilling", "Skip Drilling", "Skips drilling process"};
|
||||
static InstantFinish _DiamondCasinoHeistInstantFinish{"diamondcasinoheistinstantfinish", "Instant Finish", "Instantly passes the heist"};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
#include "core/commands/Command.hpp"
|
||||
#include "core/commands/IntCommand.hpp"
|
||||
#include "core/commands/ListCommand.hpp"
|
||||
#include "game/gta/Stats.hpp"
|
||||
#include "game/gta/ScriptGlobal.hpp"
|
||||
#include "game/gta/ScriptLocal.hpp"
|
||||
#include "core/backend/ScriptMgr.hpp"
|
||||
|
||||
namespace YimMenu::Features
|
||||
{
|
||||
namespace DoomsdayHeist
|
||||
{
|
||||
static IntCommand _DoomsdayHeistCut1{"doomsdayheistcut1", "Player 1", "Player 1 cut", std::nullopt, std::nullopt, 0};
|
||||
static IntCommand _DoomsdayHeistCut2{"doomsdayheistcut2", "Player 2", "Player 2 cut", std::nullopt, std::nullopt, 0};
|
||||
static IntCommand _DoomsdayHeistCut3{"doomsdayheistcut3", "Player 3", "Player 3 cut", std::nullopt, std::nullopt, 0};
|
||||
static IntCommand _DoomsdayHeistCut4{"doomsdayheistcut4", "Player 4", "Player 4 cut", std::nullopt, std::nullopt, 0};
|
||||
|
||||
class SetCuts : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
auto base = ScriptGlobal(1962078).At(812).At(50);
|
||||
|
||||
*base.At(1).As<int*>() = _DoomsdayHeistCut1.GetState();
|
||||
*base.At(2).As<int*>() = _DoomsdayHeistCut2.GetState();
|
||||
*base.At(3).As<int*>() = _DoomsdayHeistCut3.GetState();
|
||||
*base.At(4).As<int*>() = _DoomsdayHeistCut4.GetState();
|
||||
}
|
||||
};
|
||||
|
||||
class ForceReady : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
auto base = ScriptGlobal(1882925);
|
||||
|
||||
*base.At(0, 149).At(43).At(0).At(4).At(8).As<int*>() = 1;
|
||||
*base.At(1, 149).At(43).At(1).At(4).At(8).As<int*>() = 1;
|
||||
*base.At(2, 149).At(43).At(2).At(4).At(8).As<int*>() = 1;
|
||||
*base.At(3, 149).At(43).At(3).At(4).At(8).As<int*>() = 1;
|
||||
}
|
||||
};
|
||||
|
||||
static std::vector<std::pair<int, const char*>> doomsdayHeistCategory = {
|
||||
{0, "The Data Breaches"},
|
||||
{1, "The Bogdan Problem"},
|
||||
{2, "The Doomsday Senario"}
|
||||
};
|
||||
static ListCommand _DoomsdayHeistCategory{"doomsdayheistcategory", "Select Heist", "Heist categories", doomsdayHeistCategory, 0};
|
||||
|
||||
class Setup : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
switch (_DoomsdayHeistCategory.GetState())
|
||||
{
|
||||
case 0:
|
||||
Stats::SetInt("MPX_GANGOPS_FLOW_MISSION_PROG", 503);
|
||||
Stats::SetInt("MPX_GANGOPS_HEIST_STATUS", -229383);
|
||||
Stats::SetInt("MPX_GANGOPS_FLOW_NOTIFICATIONS", 1557);
|
||||
break;
|
||||
case 1:
|
||||
Stats::SetInt("MPX_GANGOPS_FLOW_MISSION_PROG", 240);
|
||||
Stats::SetInt("MPX_GANGOPS_HEIST_STATUS", -229378);
|
||||
Stats::SetInt("MPX_GANGOPS_FLOW_NOTIFICATIONS", 1557);
|
||||
break;
|
||||
case 2:
|
||||
Stats::SetInt("MPX_GANGOPS_FLOW_MISSION_PROG", 16368);
|
||||
Stats::SetInt("MPX_GANGOPS_HEIST_STATUS", -229380);
|
||||
Stats::SetInt("MPX_GANGOPS_FLOW_NOTIFICATIONS", 1557);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
ScriptMgr::Yield(500ms);
|
||||
|
||||
*ScriptLocal("gb_gang_ops_planning"_J, 207).As<int*>() = 6; // Reload planning screen
|
||||
}
|
||||
};
|
||||
|
||||
class SkipHacking : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
*ScriptLocal("fm_mission_controller"_J, 1538).As<int*>() = 3;
|
||||
*ScriptLocal("fm_mission_controller"_J, 1569).As<int*>() = 2;
|
||||
*ScriptLocal("fm_mission_controller"_J, 1294).At(135).As<int*>() = 3;
|
||||
}
|
||||
};
|
||||
|
||||
class InstantFinish : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
Scripts::ForceScriptHost(Scripts::FindScriptThread("fm_mission_controller"_J));
|
||||
ScriptMgr::Yield(500ms);
|
||||
|
||||
*ScriptLocal("fm_mission_controller"_J, 20387).At(1725).At(1).As<int*>() = 80;
|
||||
*ScriptLocal("fm_mission_controller"_J, 20387).As<int*>() = 12;
|
||||
*ScriptLocal("fm_mission_controller"_J, 29006).At(1).As<int*>() = 99999;
|
||||
*ScriptLocal("fm_mission_controller"_J, 32462).At(1).At(68).As<int*>() = 99999;
|
||||
|
||||
// TODO: find a way of getting current heist info so that InstantFinishAct3 can be implemented here conditionally.
|
||||
}
|
||||
};
|
||||
|
||||
class InstantFinishAct3 : public Command
|
||||
{
|
||||
using Command::Command;
|
||||
|
||||
virtual void OnCall() override
|
||||
{
|
||||
Scripts::ForceScriptHost(Scripts::FindScriptThread("fm_mission_controller"_J));
|
||||
ScriptMgr::Yield(500ms);
|
||||
|
||||
*ScriptLocal("fm_mission_controller"_J, 20387).As<int*>() = 12;
|
||||
*ScriptLocal("fm_mission_controller"_J, 20387).At(1740).At(1).As<int*>() = 150;
|
||||
*ScriptLocal("fm_mission_controller"_J, 20387).At(1062).As<int*>() = 5;
|
||||
*ScriptLocal("fm_mission_controller"_J, 29006).At(1).As<int*>() = 99999;
|
||||
*ScriptLocal("fm_mission_controller"_J, 32462).At(1).At(68).As<int*>() = 99999;
|
||||
}
|
||||
};
|
||||
|
||||
static SetCuts _DoomsdayHeistSetCuts{"doomsdayheistsetcuts", "Set Cuts", "Sets heist cut"};
|
||||
static ForceReady _DoomsdayHeistForceReady{"doomsdayheistforceready", "Force Ready", "Forces all players to be ready"};
|
||||
static Setup _DoomsdayHeistSetup{"doomsdayheistsetup", "Setup", "Sets up doomsday heist"};
|
||||
static SkipHacking _DoomsdayHeistSkipHacking{"doomsdayheistskiphacking", "Skip Hacking", "Skips hacking process"};
|
||||
static InstantFinish _DoomsdayHeistInstantFinish{"doomsdayheistinstantfinish", "Instant Finish", "Instantly passes the heist"};
|
||||
static InstantFinishAct3 _DoomsdayHeistInstantFinishAct3{"doomsdayheistinstantfinishact3", "Instant Finish (Act: III)", "Instantly passes Doomsday Scenario Act: III"};
|
||||
}
|
||||
}
|
||||
@@ -75,7 +75,6 @@ namespace YimMenu::Features
|
||||
auto new_coords{coords};
|
||||
ResolveZCoordinate(new_coords);
|
||||
Self::GetPed().TeleportTo(new_coords);
|
||||
ScriptMgr::Yield();
|
||||
});
|
||||
HUD::SET_WAYPOINT_OFF();
|
||||
}
|
||||
|
||||
@@ -197,4 +197,20 @@ namespace YimMenu
|
||||
std::optional<std::string> m_LabelOverride;
|
||||
std::optional<std::string> m_CurrentInput = std::nullopt;
|
||||
};
|
||||
|
||||
class TabItem : public UIItem
|
||||
{
|
||||
public:
|
||||
explicit TabItem(const std::string& name);
|
||||
void Draw() override;
|
||||
|
||||
void AddItem(std::shared_ptr<UIItem>&& item)
|
||||
{
|
||||
m_Items.push_back(std::move(item));
|
||||
}
|
||||
|
||||
private:
|
||||
std::string m_Name;
|
||||
std::vector<std::shared_ptr<UIItem>> m_Items;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#include "Items.hpp"
|
||||
|
||||
namespace YimMenu
|
||||
{
|
||||
TabItem::TabItem(const std::string& name) :
|
||||
m_Name(name)
|
||||
{
|
||||
}
|
||||
|
||||
void TabItem::Draw()
|
||||
{
|
||||
if (ImGui::BeginTabItem(m_Name.c_str()))
|
||||
{
|
||||
for (auto& item : m_Items)
|
||||
{
|
||||
if (item->CanDraw())
|
||||
item->Draw();
|
||||
}
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "game/frontend/items/Items.hpp"
|
||||
#include "game/frontend/submenus/Network/SavedPlayers.hpp"
|
||||
#include "game/gta/Network.hpp"
|
||||
#include "game/frontend/submenus/network/RandomEvents.hpp"
|
||||
#include "game/frontend/submenus/Network/RandomEvents.hpp"
|
||||
|
||||
namespace YimMenu::Submenus
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "game/features/recovery/GiveVehicleReward.hpp"
|
||||
#include "Recovery/StatEditor.hpp"
|
||||
#include "Recovery/Transactions.hpp"
|
||||
#include "Recovery/HeistModifier.hpp"
|
||||
|
||||
namespace YimMenu::Submenus
|
||||
{
|
||||
@@ -13,7 +14,6 @@ namespace YimMenu::Submenus
|
||||
auto missions = std::make_shared<Category>("Missions");
|
||||
auto vehiclesGroup = std::make_shared<Group>("Vehicles");
|
||||
auto generalGroup = std::make_shared<Group>("General");
|
||||
auto cayoPericoGroup = std::make_shared<Group>("Cayo Perico");
|
||||
|
||||
vehiclesGroup->AddItem(std::make_shared<BoolCommandItem>("dlcvehicles"_J));
|
||||
|
||||
@@ -30,15 +30,12 @@ namespace YimMenu::Submenus
|
||||
generalGroup->AddItem(std::make_shared<BoolCommandItem>("playallmissionssolo"_J));
|
||||
generalGroup->AddItem(std::make_shared<CommandItem>("forcelaunchheist"_J));
|
||||
|
||||
cayoPericoGroup->AddItem(std::make_shared<CommandItem>("skipcayosetup"_J));
|
||||
cayoPericoGroup->AddItem(std::make_shared<CommandItem>("skipcayocooldown"_J));
|
||||
|
||||
shopping->AddItem(vehiclesGroup);
|
||||
missions->AddItem(generalGroup);
|
||||
missions->AddItem(cayoPericoGroup);
|
||||
AddCategory(std::move(shopping));
|
||||
AddCategory(std::move(missions));
|
||||
AddCategory(BuildStatEditorMenu());
|
||||
AddCategory(BuildTransactionsMenu());
|
||||
AddCategory(BuildHeistModifierMenu());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
#include "ApartmentHeist.hpp"
|
||||
|
||||
namespace YimMenu::Submenus
|
||||
{
|
||||
std::shared_ptr<TabItem> RenderApartmentHeistMenu()
|
||||
{
|
||||
auto tab = std::make_shared<TabItem>("Apartment Heist");
|
||||
|
||||
auto cuts = std::make_shared<Group>("Heist Cuts", 2);
|
||||
auto setups = std::make_shared<Group>("Heist Setups");
|
||||
auto misc = std::make_shared<Group>("Misc", 1);
|
||||
|
||||
cuts->AddItem(std::make_shared<IntCommandItem>("apartmentheistcut1"_J));
|
||||
cuts->AddItem(std::make_shared<IntCommandItem>("apartmentheistcut3"_J));
|
||||
cuts->AddItem(std::make_shared<IntCommandItem>("apartmentheistcut2"_J));
|
||||
cuts->AddItem(std::make_shared<IntCommandItem>("apartmentheistcut4"_J));
|
||||
cuts->AddItem(std::make_shared<CommandItem>("apartmentheistforceready"_J));
|
||||
cuts->AddItem(std::make_shared<CommandItem>("apartmentheistsetcuts"_J));
|
||||
|
||||
setups->AddItem(std::make_shared<CommandItem>("apartmentheistsetup"_J));
|
||||
|
||||
misc->AddItem(std::make_shared<CommandItem>("apartmentheistskiphacking"_J));
|
||||
misc->AddItem(std::make_shared<CommandItem>("apartmentheistskipdrilling"_J));
|
||||
misc->AddItem(std::make_shared<CommandItem>("apartmentheistinstantfinish"_J));
|
||||
misc->AddItem(std::make_shared<CommandItem>("apartmentheistinstantfinishpacific"_J));
|
||||
|
||||
tab->AddItem(cuts);
|
||||
tab->AddItem(setups);
|
||||
tab->AddItem(misc);
|
||||
|
||||
return tab;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#include "game/frontend/submenus/Recovery/HeistModifier.hpp"
|
||||
|
||||
namespace YimMenu::Submenus
|
||||
{
|
||||
std::shared_ptr<TabItem> RenderApartmentHeistMenu();
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
#include "CayoPericoHeist.hpp"
|
||||
|
||||
namespace YimMenu::Submenus
|
||||
{
|
||||
std::shared_ptr<TabItem> RenderCayoPericoHeistMenu()
|
||||
{
|
||||
auto tab = std::make_shared<TabItem>("Cayo Perico Heist");
|
||||
|
||||
auto cuts = std::make_shared<Group>("Heist Cuts", 2);
|
||||
auto setups = std::make_shared<Group>("Heist Setups");
|
||||
auto loots = std::make_shared<Group>("Loots");
|
||||
auto misc = std::make_shared<Group>("Misc", 1);
|
||||
|
||||
cuts->AddItem(std::make_shared<IntCommandItem>("cayopericoheistcut1"_J));
|
||||
cuts->AddItem(std::make_shared<IntCommandItem>("cayopericoheistcut3"_J));
|
||||
cuts->AddItem(std::make_shared<IntCommandItem>("cayopericoheistcut2"_J));
|
||||
cuts->AddItem(std::make_shared<IntCommandItem>("cayopericoheistcut4"_J));
|
||||
cuts->AddItem(std::make_shared<CommandItem>("cayopericoheistforceready"_J));
|
||||
cuts->AddItem(std::make_shared<CommandItem>("cayopericoheistsetcuts"_J));
|
||||
|
||||
setups->AddItem(std::make_shared<ListCommandItem>("cayopericoheistdifficulty"_J));
|
||||
setups->AddItem(std::make_shared<ListCommandItem>("cayopericoheistprimarytarget"_J));
|
||||
setups->AddItem(std::make_shared<ListCommandItem>("cayopericoheistweapon"_J));
|
||||
setups->AddItem(std::make_shared<CommandItem>("cayopericoheistsetup"_J));
|
||||
|
||||
loots->AddItem(std::make_shared<IntCommandItem>("cayopericoheistprimarytargetvalue"_J));
|
||||
loots->AddItem(std::make_shared<ImGuiItem>([] {
|
||||
ImGui::SameLine();
|
||||
}));
|
||||
loots->AddItem(std::make_shared<CommandItem>("cayopericoheistsetprimarytargetvalue"_J));
|
||||
loots->AddItem(std::make_shared<IntCommandItem>("cayopericoheistsecondarytakevalue"_J));
|
||||
loots->AddItem(std::make_shared<ImGuiItem>([] {
|
||||
ImGui::SameLine();
|
||||
}));
|
||||
loots->AddItem(std::make_shared<CommandItem>("cayopericoheistsetsecondarytakevalue"_J));
|
||||
|
||||
misc->AddItem(std::make_shared<CommandItem>("cayopericoheistskiphacking"_J));
|
||||
misc->AddItem(std::make_shared<CommandItem>("cayopericoheistcutsewer"_J));
|
||||
misc->AddItem(std::make_shared<CommandItem>("cayopericoheistcutglass"_J));
|
||||
misc->AddItem(std::make_shared<CommandItem>("cayopericoheisttakeprimarytarget"_J));
|
||||
misc->AddItem(std::make_shared<CommandItem>("cayopericoheistinstantfinish"_J));
|
||||
|
||||
tab->AddItem(cuts);
|
||||
tab->AddItem(setups);
|
||||
tab->AddItem(loots);
|
||||
tab->AddItem(misc);
|
||||
|
||||
return tab;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#include "game/frontend/submenus/Recovery/HeistModifier.hpp"
|
||||
|
||||
namespace YimMenu::Submenus
|
||||
{
|
||||
std::shared_ptr<TabItem> RenderCayoPericoHeistMenu();
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
#include "DiamondCasinoHeist.hpp"
|
||||
|
||||
namespace YimMenu::Submenus
|
||||
{
|
||||
std::shared_ptr<TabItem> RenderDiamondCasinoHeistMenu()
|
||||
{
|
||||
auto tab = std::make_shared<TabItem>("Diamond Casino Heist");
|
||||
|
||||
auto cuts = std::make_shared<Group>("Heist Cuts", 2);
|
||||
auto setups1 = std::make_shared<Group>("Heist Setups");
|
||||
auto setups2 = std::make_shared<Group>("");
|
||||
auto loots = std::make_shared<Group>("Loots");
|
||||
auto misc = std::make_shared<Group>("Misc", 1);
|
||||
|
||||
cuts->AddItem(std::make_shared<IntCommandItem>("diamondcasinoheistcut1"_J));
|
||||
cuts->AddItem(std::make_shared<IntCommandItem>("diamondcasinoheistcut3"_J));
|
||||
cuts->AddItem(std::make_shared<IntCommandItem>("diamondcasinoheistcut2"_J));
|
||||
cuts->AddItem(std::make_shared<IntCommandItem>("diamondcasinoheistcut4"_J));
|
||||
cuts->AddItem(std::make_shared<CommandItem>("diamondcasinoheistforceready"_J));
|
||||
cuts->AddItem(std::make_shared<CommandItem>("diamondcasinoheistsetcuts"_J));
|
||||
|
||||
setups1->AddItem(std::make_shared<ListCommandItem>("diamondcasinoheistdifficulty"_J));
|
||||
setups1->AddItem(std::make_shared<ListCommandItem>("diamondcasinoheistprimarytarget"_J));
|
||||
setups1->AddItem(std::make_shared<ListCommandItem>("diamondcasinoheistapproach"_J));
|
||||
setups1->AddItem(std::make_shared<ListCommandItem>("diamondcasinoheistgunman"_J));
|
||||
setups1->AddItem(std::make_shared<ImGuiItem>([] {
|
||||
ImGui::SameLine();
|
||||
}));
|
||||
setups1->AddItem(std::make_shared<ListCommandItem>("diamondcasinoheistweapon"_J));
|
||||
setups2->AddItem(std::make_shared<ListCommandItem>("diamondcasinoheistdriver"_J));
|
||||
setups2->AddItem(std::make_shared<ImGuiItem>([] {
|
||||
ImGui::SameLine();
|
||||
}));
|
||||
setups2->AddItem(std::make_shared<ListCommandItem>("diamondcasinoheistvehicle"_J));
|
||||
setups2->AddItem(std::make_shared<ListCommandItem>("diamondcasinoheisthacker"_J));
|
||||
setups2->AddItem(std::make_shared<CommandItem>("diamondcasinoheistsetup"_J));
|
||||
|
||||
loots->AddItem(std::make_shared<IntCommandItem>("diamondcasinoheistpotentialtake"_J));
|
||||
loots->AddItem(std::make_shared<ImGuiItem>([] {
|
||||
ImGui::SameLine();
|
||||
}));
|
||||
loots->AddItem(std::make_shared<CommandItem>("diamondcasinoheistsetpotentialtake"_J));
|
||||
loots->AddItem(std::make_shared<IntCommandItem>("diamondcasinoheistactualtake"_J));
|
||||
loots->AddItem(std::make_shared<ImGuiItem>([] {
|
||||
ImGui::SameLine();
|
||||
}));
|
||||
loots->AddItem(std::make_shared<CommandItem>("diamondcasinoheistsetactualtake"_J));
|
||||
|
||||
misc->AddItem(std::make_shared<CommandItem>("diamondcasinoheistskiphacking"_J));
|
||||
misc->AddItem(std::make_shared<CommandItem>("diamondcasinoheistskipdrilling"_J));
|
||||
misc->AddItem(std::make_shared<CommandItem>("diamondcasinoheistinstantfinish"_J));
|
||||
|
||||
tab->AddItem(cuts);
|
||||
tab->AddItem(setups1);
|
||||
tab->AddItem(setups2);
|
||||
tab->AddItem(loots);
|
||||
tab->AddItem(misc);
|
||||
|
||||
return tab;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#include "game/frontend/submenus/Recovery/HeistModifier.hpp"
|
||||
|
||||
namespace YimMenu::Submenus
|
||||
{
|
||||
std::shared_ptr<TabItem> RenderDiamondCasinoHeistMenu();
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
#include "DoomsdayHeist.hpp"
|
||||
|
||||
namespace YimMenu::Submenus
|
||||
{
|
||||
std::shared_ptr<TabItem> RenderDoomsdayHeistMenu()
|
||||
{
|
||||
auto tab = std::make_shared<TabItem>("Doomsday Heist");
|
||||
|
||||
auto cuts = std::make_shared<Group>("Heist Cuts", 2);
|
||||
auto setups = std::make_shared<Group>("Heist Setups");
|
||||
auto misc = std::make_shared<Group>("Misc", 1);
|
||||
|
||||
cuts->AddItem(std::make_shared<IntCommandItem>("doomsdayheistcut1"_J));
|
||||
cuts->AddItem(std::make_shared<IntCommandItem>("doomsdayheistcut3"_J));
|
||||
cuts->AddItem(std::make_shared<IntCommandItem>("doomsdayheistcut2"_J));
|
||||
cuts->AddItem(std::make_shared<IntCommandItem>("doomsdayheistcut4"_J));
|
||||
cuts->AddItem(std::make_shared<CommandItem>("doomsdayheistforceready"_J));
|
||||
cuts->AddItem(std::make_shared<CommandItem>("doomsdayheistsetcuts"_J));
|
||||
|
||||
setups->AddItem(std::make_shared<ListCommandItem>("doomsdayheistcategory"_J));
|
||||
setups->AddItem(std::make_shared<CommandItem>("doomsdayheistsetup"_J));
|
||||
|
||||
misc->AddItem(std::make_shared<CommandItem>("doomsdayheistskiphacking"_J));
|
||||
misc->AddItem(std::make_shared<CommandItem>("doomsdayheistinstantfinish"_J));
|
||||
misc->AddItem(std::make_shared<CommandItem>("doomsdayheistinstantfinishact3"_J));
|
||||
|
||||
tab->AddItem(cuts);
|
||||
tab->AddItem(setups);
|
||||
tab->AddItem(misc);
|
||||
|
||||
return tab;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#include "game/frontend/submenus/Recovery/HeistModifier.hpp"
|
||||
|
||||
namespace YimMenu::Submenus
|
||||
{
|
||||
std::shared_ptr<TabItem> RenderDoomsdayHeistMenu();
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
#include "HeistModifier.hpp"
|
||||
#include "Heist/ApartmentHeist.hpp"
|
||||
#include "Heist/DiamondCasinoHeist.hpp"
|
||||
#include "Heist/CayoPericoHeist.hpp"
|
||||
#include "Heist/DoomsdayHeist.hpp"
|
||||
|
||||
namespace YimMenu::Submenus
|
||||
{
|
||||
std::shared_ptr<Category> BuildHeistModifierMenu()
|
||||
{
|
||||
auto menu = std::make_shared<Category>("Heists");
|
||||
|
||||
menu->AddItem(std::make_shared<ImGuiItem>([] {
|
||||
ImGui::BeginTabBar("Heist Modifier");
|
||||
}));
|
||||
menu->AddItem(RenderApartmentHeistMenu());
|
||||
menu->AddItem(RenderDiamondCasinoHeistMenu());
|
||||
menu->AddItem(RenderCayoPericoHeistMenu());
|
||||
menu->AddItem(RenderDoomsdayHeistMenu());
|
||||
menu->AddItem(std::make_shared<ImGuiItem>([] {
|
||||
ImGui::EndTabBar();
|
||||
}));
|
||||
|
||||
return menu;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
#include "core/frontend/manager/Category.hpp"
|
||||
#include "game/frontend/items/Items.hpp"
|
||||
|
||||
namespace YimMenu::Submenus
|
||||
{
|
||||
std::shared_ptr<Category> BuildHeistModifierMenu();
|
||||
}
|
||||
@@ -42,5 +42,4 @@ namespace YimMenu
|
||||
void* Get() const;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
@@ -2,6 +2,8 @@
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <types/script/scrThread.hpp>
|
||||
#include <core/util/Joaat.hpp>
|
||||
#include <src/game/gta/Scripts.hpp>
|
||||
|
||||
namespace YimMenu
|
||||
{
|
||||
@@ -32,6 +34,12 @@ namespace YimMenu
|
||||
|
||||
}
|
||||
|
||||
constexpr ScriptLocal(joaat_t script, std::size_t index) :
|
||||
ScriptLocal(Scripts::FindScriptThread(script)->m_Stack, index)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
constexpr ScriptLocal At(std::ptrdiff_t offset) const
|
||||
{
|
||||
return { m_StackPtr, m_Index + offset };
|
||||
|
||||
Reference in new issue
Block a user