Player.Angle
From Liberty Unleashed Wiki
This function sets/returns a given player's facing angle. Setting the angle only affects the local player.
Syntax
float Player.Angle( float Angle )
Arguments
- Angle - What you can set the facing angle too.
Example 1. Returning
function onClientCommand( szCommand, szText ) { local pPlayer = FindLocalPlayer( ); if ( szCommand == "angle" ) Message( "Your facing angle is " + pPlayer.Angle + "." ); }
This will tell the local player what their facing angle currently is.
Example 2. Setting
function onClientCommand( szCommand, szText ) { local pPlayer = FindLocalPlayer( ); if ( szCommand == "setangle" ) pPlayer.Angle = 0.00; }
This will set the local player's facing angle to be north.
Notes
The call onClientCommand and Message were used in in this example. More info about them in the corresponding page.
Related Functions
- FindLocalPlayer
- FindPlayer
- Player.Angle
- Player.Armour
- Player.Cash
- Player.Class
- Player.Colour
- Player.Frozen
- Player.Health
- Player.ID
- Player.Immune
- Player.Island
- Player.Marker
- Player.Name
- Player.Ping
- Player.Pos
- Player.RemoveLimb
- Player.Score
- Player.Skin
- Player.Spawn
- Player.Team
- Player.Train
- Player.Vehicle
- Player.Velocity
- Player.VirtualWorld
- Player.WantedLevel
- Player.Weapon
- Player.WeaponAmmo
- Player.WeaponState