undo.SetCustomUndoText

From Garry's Mod
Jump to: navigation, search
 undo.SetCustomUndoText( )

Contents

Description

Sets a custom undo text for the current undo block

Arguments

string customText

The text to display when the undo block is undone

Examples

Example

This example creates a prop_physics, adds it to the players undo list, and sets a custom undo text

local prop = ents.Create( "prop_physics" )
prop:SetModel( "models/props_junk/wood_crate001a.mdl" )
prop:Spawn()
undo.Create( "prop" )
 undo.AddEntity( prop )
 undo.SetPlayer( Player )
 undo.SetCustomUndoText("Undone a crate prop")
undo.Finish()


Personal tools
Navigation