toribio

toribio

May 27th, 2009
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
  2. {   // Created by Y_Less
  3.  
  4.     new Float:a;
  5.  
  6.     GetPlayerPos(playerid, x, y, a);
  7.     GetPlayerFacingAngle(playerid, a);
  8.  
  9.     if (GetPlayerVehicleID(playerid)) {
  10.         GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
  11.     }
  12.  
  13.     x += (distance * floatsin(-a, degrees));
  14.     y += (distance * floatcos(-a, degrees));
  15. }
Advertisement
Add Comment
Please, Sign In to add comment