Advertisement
Guest User

Untitled

a guest
Mar 10th, 2011
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. new Float:oldposx, Float:oldposy, Float:oldposz;
  6. new Float:tempposx, Float:tempposy, Float:tempposz;
  7. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  8. tempposx = (oldposx -x);
  9. tempposy = (oldposy -y);
  10. tempposz = (oldposz -z);
  11. //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  12. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  13. {
  14. return 1;
  15. }
  16. }
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement