Garry's Mod Wiki

undo.SetCustomUndoText

undo.SetCustomUndoText( string customText )

Description

Sets a custom undo text for the current undo block

Arguments

1 string customText
The text to display when the undo block is undone

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()

Page Links


Special Pages


Wikis

?

Render Time: 73ms

DB GetPage 45
Generate Html 3
SaveChanges (1) 10
Render Body 0
Render Sidebar 12