From Garry's Mod
Revision as of 22:43, 1 July 2013 by Sam
Completes an undo entry, and registers it with the player's client
This example creates a prop_physics, and adds it to the players undo list.
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()