Garry's Mod Wiki

Garry's Mod Wiki

  number undo.Do_Undo( table tab )

Description

Processes an undo block (in table form). This is used internally by the undo manager when a player presses Z.

You should use gm_undo or gm_undonum *num* console commands instead of calling this function directly.

Arguments

1 table tab
The undo block to process as an Undo structure

Returns

1 number
Number of removed entities

Example

This example removes two entities, and informs player 1 that they just "Undone Prop!"

local tab = {} tab.Owner = Entity(1) tab.Name = "prop" tab.Entities = {Entity(56),Entity(57)} undo.Do_Undo(tab)

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 four times a day. Edits and history are not available.

Last Parsed: Loading...