WPlayer - lnx00/Lmaobox-Library GitHub Wiki
lnxLib.TF2.WPlayer
Wrapper for the player entity. Inherits from WEntity.
Functions
.FromEntity(entity)Creates a WPlayer from a given native Entity. The entity needs to be a player!.GetLocal()Returns a WPlayer of the local player ornilif it doesn't exist.
Methods
:IsOnGround()Returns whether the player is on the ground.:GetActiveWeapon()Returns the active weapon as a WWeapon.:GetObserverMode()Returns the spectator mode of the player (first person, third person, etc.).:GetObserverTarget()Returns the spactated target as a WPlayer.:GetNextAttack()Returns the time when the player can attack again.:GetHitboxPos(hitboxID)Returns the position of the hitbox as a Vector3.:GetViewOffset()Returns the view offset of the player.:GetEyePos()Returns position of the players view as Vector3.:GetEyeAngles()Returns the eye angles of the player as EulerAngles.:GetViewPos()Returns the position the player is looking at.