Garry's Mod Wiki

Garry's Mod Wiki

  boolean GM:OnPauseMenuShow()

Recently Added

This was recently added in version (2024.07.11). It might only be available on the Dev Branch right now.

Description

Called when the pause menu is attempting to be opened. Allows you to prevent the main menu from being opened that time.

The user can hold ⇧ shift to not call this hook. If the main menu is blocked multiple times in short succession, a warning will be displayed to the end user on how to bypass the hook.

Returns

1 boolean ShouldOpen
Should the menu be allowed to open?

Example

Stops the main menu from opening

hook.Add( "OnPauseMenuShow", "DisableMenu", function() chat.AddText( "Press Shift+Escape to open the menu." ) return false end )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...