Resume Gameplay: Lua Script for Pausing 3.0

Gameplay Lua


Description


Resume Gameplay: Lua Script for Pausing

Have you ever wanted to access the pause menu map to set a waypoint while being driven, adjust settings, or interact with the pause menu elements while an event unfolds in the background without completely halting the game? This script provides that functionality!

Here's how it works: a quick press (and release) of your pause button opens the pause menu without pausing the game. If you want to fully pause the game within the menu, simply press and hold the pause button for 1 second.

This script requires ScriptHookV and JM36 Lua Plugin. Place "PauseMenuGamePauseControl.lua" into your JM36 Lua Plugin "ScriptsDir-Lua/Modules" directory.

Changelog

v3.0

  • Included additional checks to prevent unintended pauses, such as those occurring while typing in game text boxes.

v2.0

  • Improved the internal logic of game pausing:
    • Eliminated the need to "unpause" and then "repause" for a full freeze pause.
    • Scripts with poor timing implementation may experience issues with this version if they don't check for the active pause menu. Use an older version of this script in such cases (and let me know about the problematic script).

    v1.1

    • Improved and simplified code for better readability and efficiency.
    • Renamed from "Pause Menu Game Pause Control [.Lua]"

    First Upload: November 11, 2024 Last Updated: November 11, 2024


0 Comments