SHARE
TWEET

GetInFrontOfObject

Gheecco Apr 15th, 2020 (edited) 877 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. stock GetInFrontOfObject(objectid, &Float:x, &Float:y, &Float:z, Float:distance)
  2. {
  3.     new Float:angle, Float:rx, Float:ry;
  4.  
  5.     GetObjectPos(objectid, x, y, z);
  6.     GetObjectRot(objectid, rx, ry, angle);
  7.  
  8.     x += (distance * floatsin(-angle, degrees));
  9.     y += (distance * floatcos(-angle, degrees));
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top