Garry's Mod Wiki

Revision Difference

undo.Do_Undo#517896

<function name="Do_Undo" parent="undo" type="libraryfunc"> <description>Processes an undo block (in table form). This is used internally by the undo manager when a player presses Z.</description> <realm>Server</realm> <args> <arg name="tab" type="table">The undo block to process as an &lt;page&gt;Undo&lt;/page&gt;</arg>⤶ <arg name="tab" type="table">The undo block to process as an <page>Undo</page></arg>⤶ </args> <rets> <ret name="" type="number">Number of removed entities</ret> </rets> </function> <example> <description>This example removes two entities, and informs player 1 that they just "Undone Prop!"</description> <code> local tab = {} tab.Owner = Entity(1) tab.Name = "prop" tab.Entities = {Entity(56),Entity(57)} undo.Do_Undo(tab) </code> </example>