Skip to content

Fix: Fix solo mantrap#1018

Merged
ShinyWasabi merged 3 commits into
YimMenu:enhancedfrom
xZueS19:fix-solo-mantrap
Jul 19, 2026
Merged

Fix: Fix solo mantrap#1018
ShinyWasabi merged 3 commits into
YimMenu:enhancedfrom
xZueS19:fix-solo-mantrap

Conversation

@xZueS19

@xZueS19 xZueS19 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Fixing the outdated globals for solo mantrap in casino heist

@xZueS19 xZueS19 changed the title fix solo mantrap Fix: Fix solo mantrap Jul 18, 2026
{
*ScriptLocal(thread, 32785).At(Self::GetPlayer().GetId(), 294).At(143).As<int*>() = 8;
*ScriptLocal(thread, 63640).As<int*>() = 5;
*ScriptLocal(thread, 32785).At(Self::GetPlayer().GetId(), 294).At(144).As<int*>() = 8;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this is supposed to be 144? 144 only has 5 states so setting a value of 8 doesn't make sense. On the other hand, 143 has exactly 9 states (0-8) and look at case 8:

case 8:
    if (HUD::HAS_THIS_ADDITIONAL_TEXT_LOADED("MC_PLAY", 0))
        if (func_297("HPSLOCK" /* GXT: All players must trigger the switches simultaneously. Press ~INPUT_FRONTEND_RIGHT~ when you are all ready. */) || func_297("HQPSLOCK" /* GXT: Quickly press ~INPUT_FRONTEND_RIGHT~ before the unlock timer expires. */) || func_297("H1_HSL" /* GXT: Press ~INPUT_CONTEXT~ to get in position to insert the key card. */) || func_297("H2_HSL" /* GXT: Both players must insert their key cards simultaneously. Press ~INPUT_FRONTEND_ACCEPT~ when you are both ready. To back out, press ~INPUT_FRONTEND_CANCEL~. */))
            HUD::CLEAR_HELP(1);

    if (func_12487(Static_11505, 6000))
    {
        WEAPON::SET_PED_CURRENT_WEAPON_VISIBLE(Static_3283, 1, 0, 1, 0);
        func_465(Static_3281, true, 0, 0);
    
        if (!func_517(1))
            AUDIO::RELEASE_SCRIPT_AUDIO_BANK();
    
        func_14015(-1);
    }

    if (IS_BIT_SET(Static_64655, 1))
    {
        if (ENTITY::IS_ENTITY_PLAYING_ANIM(Static_3283, Static_11316, Static_11324, 3))
        {
            if (ENTITY::GET_ENTITY_ANIM_CURRENT_TIME(Static_3283, Static_11316, Static_11324) > 0.99f)
            {
                Static_11309 = Static_11309 + 1;
                func_15927(iParam1, false);
                MISC::CLEAR_BIT(&(Static_32785[Static_3284 /*294*/].f_127), 24);
                func_14015(4);
            }
        }
        else
        {
            Static_11309 = Static_11309 + 1;
            func_15927(iParam1, false);
            MISC::CLEAR_BIT(&(Static_32785[Static_3284 /*294*/].f_127), 24);
            func_14015(4);
        }
    }

    if (IS_BIT_SET(Static_64655, 2))
    {
        if (ENTITY::IS_ENTITY_PLAYING_ANIM(Static_3283, Static_11316, Static_11323, 3))
        {
            if (ENTITY::GET_ENTITY_ANIM_CURRENT_TIME(Static_3283, Static_11316, Static_11323) > 0.75f || func_15615())
            {
                Static_32785[Static_3284 /*294*/].f_26 = iParam1;
                AUDIO::START_AUDIO_SCENE("DLC_HEIST_BIOLAB_HEIST_KEYCARD_HACK_SCENE");
                func_12601(true, false);
                func_15927(iParam1, true);
                WEAPON::SET_PED_CURRENT_WEAPON_VISIBLE(Static_3283, 1, 0, 1, 0);
                TASK::CLEAR_PED_TASKS(Static_3283);
                func_465(Static_3281, true, 0, 0);
            
                if (!func_517(1))
                    AUDIO::RELEASE_SCRIPT_AUDIO_BANK();
            
                MISC::CLEAR_BIT(&(Static_32785[Static_3284 /*294*/].f_127), 24);
                func_3893(true, false);
                func_14015(-1);
            }
        }
        else
        {
            Static_32785[Static_3284 /*294*/].f_26 = iParam1;
            AUDIO::START_AUDIO_SCENE("DLC_HEIST_BIOLAB_HEIST_KEYCARD_HACK_SCENE");
            func_12601(true, false);
            func_15927(iParam1, true);
            WEAPON::SET_PED_CURRENT_WEAPON_VISIBLE(Static_3283, 1, 0, 1, 0);
            func_465(Static_3281, true, 0, 0);
            TASK::CLEAR_PED_TASKS(Static_3283);
        
            if (!func_517(1))
                AUDIO::RELEASE_SCRIPT_AUDIO_BANK();
        
            MISC::CLEAR_BIT(&(Static_32785[Static_3284 /*294*/].f_127), 24);
            func_14015(-1);
        }
    }
    break;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh mb. it's 143 actually, i only intended to change the second line not this one

@ShinyWasabi
ShinyWasabi merged commit da012b1 into YimMenu:enhanced Jul 19, 2026
@xZueS19
xZueS19 deleted the fix-solo-mantrap branch July 19, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants