Garry's Mod Wiki

GM:OnUndo

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

Example

Print a message when the player undoes something.

function GM:OnUndo( name, customText ) if customText != nil then MsgN( "Undone " .. customText ) else MsgN( "Undone " .. name ) end end
Output: Undone <action>

Page Links


Special Pages


Wikis

?

Render Time: 50ms

DB GetPage 8
Generate Html 10
SaveChanges (1) 18
Render Body 0
Render Sidebar 12