Garry's Mod Wiki

Garry's Mod Wiki

  boolean GM:OnUndo( string name, string customText )

Description

Called when the player undoes something.

Arguments

1 string name
The name of the undo action
2 string customText
The custom text for the undo, set by undo.SetCustomUndoText

Returns

1 boolean suppress
Return false to suppress the undo notification.

Example

Print a message when the player undoes something.

hook.Add( "OnUndo", "CustomUndoText", function( name, customText ) if customText ~= nil then MsgN( "Undone " .. customText ) else MsgN( "Undone " .. name ) end end )
Output: Undone <action>

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...