Garry's Mod Wiki

Player:GetViewEntity

Entity Player:GetViewEntity()

Description

Returns the entity the player is using to see from (such as the player itself, the camera, or another entity).

Returns

1 Entity
The entity the player is using to see from

Example

Will print what entity the first player uses to look through.

print( Entity( 1 ):GetViewEntity() )
Output: Player [1][ExamplePlayer]

Page Links


Special Pages


Wikis

?

Render Time: 78ms

DB GetPage 28
Generate Html 2
SaveChanges (1) 38
Render Body 0
Render Sidebar 7