diff --git a/src/game/features/recovery/Heist/KortzCenterHeist.cpp b/src/game/features/recovery/Heist/KortzCenterHeist.cpp index 7dbab28..c52397c 100644 --- a/src/game/features/recovery/Heist/KortzCenterHeist.cpp +++ b/src/game/features/recovery/Heist/KortzCenterHeist.cpp @@ -5,6 +5,8 @@ #include "game/gta/ScriptGlobal.hpp" #include "game/gta/ScriptLocal.hpp" #include "game/gta/Scripts.hpp" +#include "core/backend/ScriptMgr.hpp" +#include "game/gta/Natives.hpp" #include "game/backend/Self.hpp" namespace YimMenu::Features @@ -159,6 +161,24 @@ namespace YimMenu::Features } }; + class AutoEnterPcAccessCode : public Command + { + using Command::Command; + + virtual void OnCall() override + { + if (auto thread = Scripts::FindScriptThread("fm_mission_controller_v3"_J)) + { + for (int i = 0; i <= 2; i++) + { + *ScriptLocal(thread, 32818).At(1).At(i, 2).At(1).As() = 0; + ScriptMgr::Yield(100ms); + PAD::SET_CONTROL_VALUE_NEXT_FRAME(0, 237, 1.0); + } + } + } + }; + // --- Setup --- class Setup : public Command { @@ -214,5 +234,6 @@ namespace YimMenu::Features static TakePrimaryTarget _KortzCenterTakePrimary{"kortzcenterheisttakeprimary", "Take Primary Target", "Takes primary target painting (stand near it)"}; static TakeSecondaryTarget _KortzCenterTakeSecondary{"kortzcenterheisttakesecondary", "Take Secondary Target", "Takes secondary loot (stand near it)"}; static Setup _KortzCenterSetup{"kortzcenterheistsetup", "Setup", "Sets up Kortz Center heist"}; + static AutoEnterPcAccessCode _KortzCenterAutoEnterPcAccessCode{"kortzcenterheistautoenterpcaccesscode", "Auto-Enter PC Access Code", "Automatically enters the PC access code"}; } } diff --git a/src/game/frontend/submenus/Recovery/Heist/KortzCenterHeist.cpp b/src/game/frontend/submenus/Recovery/Heist/KortzCenterHeist.cpp index 7849f5d..288544a 100644 --- a/src/game/frontend/submenus/Recovery/Heist/KortzCenterHeist.cpp +++ b/src/game/frontend/submenus/Recovery/Heist/KortzCenterHeist.cpp @@ -52,6 +52,7 @@ namespace YimMenu::Submenus inHeist->AddItem(std::make_shared("kortzcenterheistskipfingerprint"_J)); inHeist->AddItem(std::make_shared("kortzcenterheistskipsignalnodes"_J)); inHeist->AddItem(std::make_shared("kortzcenterheistskipdatacrack"_J)); + inHeist->AddItem(std::make_shared("kortzcenterheistautoenterpcaccesscode"_J)); inHeist->AddItem(std::make_shared("kortzcenterheistcutglass"_J)); inHeist->AddItem(std::make_shared("kortzcenterheistdisablelaser"_J)); inHeist->AddItem(std::make_shared("kortzcenterheisttakeprimary"_J));