From b6543e61c4c16598b9949e8aea429899652d4714 Mon Sep 17 00:00:00 2001 From: Ali <108406083+Abdelakil@users.noreply.github.com> Date: Wed, 29 Jul 2026 14:05:51 +0200 Subject: [PATCH] feat(kortz): add auto-enter PC access code button (#1044) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(kortz): add auto-enter PC access code button Adds Auto-Enter PC Access Code in-heist shortcut that loops 3 iterations zeroing ScriptLocal(32820).At(i,2), yielding 100ms, and pressing Enter (INPUT_CELLPHONE_SELECT). * fix(kortz): apply imaginothing's ScriptLocal struct correction ScriptLocal(thread, 32818).At(1).At(i, 2).At(1) instead of flat 32820 offset — accurately reflects header skip, array stride, and field offset per native layout. --- .../recovery/Heist/KortzCenterHeist.cpp | 21 +++++++++++++++++++ .../Recovery/Heist/KortzCenterHeist.cpp | 1 + 2 files changed, 22 insertions(+) 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));