Player.GetObserverTarget

From GMod Wiki

Jump to: navigation, search
Function
Syntax Player:GetObserverTarget( )
Description:
Returns the entity the player is spectating.
Returns: Entity
In Object: Player
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.GetObserverTarget]Player.GetObserverTarget [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionGet the entity the first player is spectating.
Used onNewerShared.png
Code
print( player.GetAll()[1]:GetObserverTarget() )
OutputN/A


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox