GetPlayerFacingAngle
From SA-MP Wiki
GetPlayerFacingAngle
Get the angle of the player's current view. This could be handy if you want to spawn an object in front of a player.
(playerid,Float:Angle)
| playerid | The player you want to know the angle of. |
| Float:Angle | The variable to store the angle in, passed by reference. |
This function does not return a specific value, it's best to simply ignore it.
new Float:Angle; GetPlayerFacingAngle(playerid, Angle); if(Angle == 180.0) SendClientMessage(playerid, 0x8DC6FFFF, "You are facing South!");
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- SetPlayerFacingAngle: Set a player's facing angle.
