Revision Difference
GM:OnPauseMenuShow#562174
<function name="OnPauseMenuShow" parent="GM" type="hook">
	<added>2024.07.11</added>
	<description>
		Called when the pause menu is attempting to be opened. Allows you to disable the menu from being opened that frame.
		<note>The user can hold Shift to not call this hook.</note>
		<note>The user can hold <key>SHIFT</key> to not call this hook.</note>
	</description>
	<realm>Client</realm>
	<rets>
		<ret name="ShouldOpen" type="boolean">Should the menu be allowed to open?</ret>
	</rets>
</function>
<example>
	<description>Stops the main menu from opening</description>
	<code>
hook.Add("OnPauseMenuShow", "DisableMenu", function()
	chat.AddText("Press Shift+Escape to open the menu.")
hook.Add( "OnPauseMenuShow", "DisableMenu", function()
	chat.AddText( "Press Shift+Escape to open the menu." )
	return false
end )
 	</code>
</example>
			Garry's Mod 
		
			Rust 
		
			Steamworks 
		
			Wiki Help