Garry's Mod Wiki

Garry's Mod Wiki

  boolean GM:CanUndo( Player ply, table undo )


Called whenever a players tries to undo.


1 Player ply
The player who tried to undo something.
2 table undo
The undo table as a Undo structure.


1 boolean
Return false to disallow the undo.


Here's a trick you can do to achieve the behavior of this function on the client.

hook.Add( "PlayerBindPress", "CanUndo", function( ply, bind ) if ply == LocalPlayer() and bind == "gmod_undo" then return true -- false to allow, true to prevent end 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...