Garry's Mod Wiki

Garry's Mod Wiki

  boolean GM:OnPauseMenuShow()

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 four times a day. Edits and history are not available.

Last Parsed: Loading...