Advertisement
Johurt

[FNC] TurnPlayerFaceToCoords

Nov 11th, 2012
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.22 KB | None | 0 0
  1. stock TurnPlayerFaceToCoords(playerid, Float:x, Float:y) // by frog163
  2. {
  3.     new Float:pPos[3];
  4.     GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
  5.     SetPlayerFacingAngle(playerid, 180.0-atan2(pPos[0] - x, pPos[1] - y));
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement