SetPlayerFacingAngle

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 19:27, 30 July 2013
Drebin (Talk | contribs)
(Typos)
← Previous diff
Revision as of 17:24, 4 February 2014
Connor Mead (Talk | contribs)

Next diff →
Line 27: Line 27:
[[Category:Scripting Functions]] [[Category:Scripting Functions]]
 +
 +[[fr:SetPlayerFacingAngle]]

Revision as of 17:24, 4 February 2014



Description:

Set a player's facing angle.


Parameters:
(playerid, Float:ang)
playeridThe ID of the player to set the facing angle of.
Float:angThe angle the player should face.


Return Values:

This function does not return any specific values.


Image:32px-Circle-style-warning.png

Important
Note

Angles are reversed in GTA:SA - 90 degrees would be East in the real world, but in GTA:SA 90 is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle.


SetPlayerFacingAngle( playerid, 0 ); //Player faces north

        north (0)
           |
(90) west-   -east (270)      (Good way to remember: Never Eat Shredded Wheat)
           |
        south (180)

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

In other languages