Player.GetObserverTarget
From GMod Wiki
Function | |
Syntax | Player:GetObserverTarget( ) |
Description: | |
Returns the entity the player is spectating. | |
Returns: | Entity |
In Object: | Player |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Player.GetObserverTarget]Player.GetObserverTarget [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
Description | Get the entity the first player is spectating. |
---|---|
Used on | |
Code | print( player.GetAll()[1]:GetObserverTarget() ) |
Output | N/A |
Additional Notes
- This function is for getting the observer entity, if you wish to set the observer entity, use Player.SpectateEntity.