warning Not Translated
This page has not been translated into the language that your browser requested yet. The English content is being shown as a fallback.
If you want to contribute a translation for this page then please click here.
SetPlayerFacingAngle
Description
Set a player's facing angle (Z rotation).
Name | Description |
---|---|
playerid | The ID of the player to set the facing angle of. |
Float:angle | The angle the player should face. |
Returns
true - The function executed successfully.
false - The function failed to execute. The player specified does not exist.
Examples
SetPlayerFacingAngle(playerid, 0.0); //Player faces north
north (0)
|
(90) west- -east (270) (Good way to remember: Never Eat Shredded Wheat)
|
south (180)
Notes
warning
Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle.
Related Functions
- GetPlayerFacingAngle: Check where a player is facing.
- GetPlayerRotationQuat: Get the quaternion rotation of a player.
- SetPlayerPos: Set a player's position.