Player.SpectateEntity

From GMod Wiki

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