Squirrel/Client/Functions/Players/Angle
From Liberty Unleashed Wiki
(Difference between revisions)
(Created page with '{{Squirrel/Title|Player.Angle}} This function sets/returns a given player's facing angle. Setting the angle only affects the local player. == Syntax == <code>float Player.Angleā¦') |
Latest revision as of 04:27, 24 September 2011
This function sets/returns a given player's facing angle. Setting the angle only affects the local player.
[edit] Syntax
float Player.Angle( float Angle )
[edit] Arguments
- Angle - What you can set the facing angle too.
[edit] 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.
[edit] 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.
[edit] Notes
The call onClientCommand and Message were used in in this example. More info about them in the corresponding page.
[edit] 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