Player.SpectateEntity

From GMod Wiki

Revision as of 16:41, 8 May 2010 by JohnnyOwns (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax Player:SpectateEntity( Entity )
Description:
Sets the entity the player is spectating
Returns: nil
In Object: Player
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.SpectateEntity]Player.SpectateEntity [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionThis will make the player spectate the entity passed to the function.
Used onNewerServer.png
Code
function spectate(ply, ent)
  ply:Spectate(4)
  ply:SpectateEntity(ent)
end
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox