toribio

toribio

Aug 30th, 2008
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  2. {
  3.     new Float:oldposx, Float:oldposy, Float:oldposz;
  4.     new Float:tempposx, Float:tempposy, Float:tempposz;
  5.     GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  6.     tempposx = (oldposx -x);
  7.     tempposy = (oldposy -y);
  8.     tempposz = (oldposz -z);
  9.     if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  10.     {
  11.         return 1;
  12.     }
  13.     return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment