Guest User

function with tag result used before definition, forcing rep

a guest
Mar 31st, 2011
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.39 KB | None | 0 0
  1. stock Float:GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
  2. {
  3.     new Float:a;
  4.     GetPlayerPos(playerid, x, y, a);
  5.     if (IsPlayerInAnyVehicle(playerid))
  6.         GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
  7.     else
  8.         GetPlayerFacingAngle(playerid, a);
  9.     x += (distance * floatsin(-a, degrees));
  10.     y += (distance * floatcos(-a, degrees));
  11.     return a;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment