G.GetViewEntity

From GMod Wiki

Revision as of 21:42, 2 November 2009 by Crazy Quebecer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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