Garry's Mod Wiki

undo.SetPlayer

undo.SetPlayer( Player ply )

Description

Sets the player which the current undo block belongs to

Arguments

1 Player ply
The player responsible for undoing the block

Example

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(ply) undo.Finish()

Page Links


Special Pages


Wikis

?

Render Time: 32ms

DB GetPage 6
Generate Html 2
SaveChanges (1) 9
Render Body 0
Render Sidebar 12