Garry's Mod Wiki

Garry's Mod Wiki

  undo.Finish( string NiceText = nil )

Description

Completes an undo entry, and registers it with the player's client

Arguments

1 string NiceText = nil
Text that appears in the player's undo history. If unset, is set to undo's name.

Example

This example creates a prop_physics, and adds it to the players undo list.

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.Finish( "Prop (" .. prop:GetModel() .. ")" )

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