undo.SetPlayer

From GMod Wiki

Revision as of 00:15, 22 October 2009 by Crazy Quebecer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax undo.SetPlayer( Player player )
Where is this used?
Description:
Set the player that the undo entry belongs to.
Returns: nil
Part of Library: Undo
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Undo.SetPlayer]Undo.SetPlayer [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThis example creates a prop_physics, and adds it to the players undo list.
Used onNewerServer.png
Code
prop = ents.Create("Prop_Physics")
undo.Create("prop")
    undo.AddEntity(prop)
    undo.SetPlayer(Player)
undo.Finish()
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox