G.GetViewEntity

From GMod Wiki

Jump to: navigation, search
Function
Syntax GetViewEntity( )
Where is this used?
Description:
Returns the view entity the player is using (the player itself or the camera).
Returns: Entity
Part of Library: Global Functions
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=G.GetViewEntity]G.GetViewEntity [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionWill print what entity the client uses to see.
Used onNewerClient.png
Code
print( GetViewEntity() )
OutputEntity [26][gmod_cameraprop] (While looking through a camera, otherwise, it will be the player entity.)


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox