Guest User

Untitled

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