Advertisement
DoctorX13

XCoords

Sep 23rd, 2019
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. UI = 1;
  2. home = 0;
  3.  
  4. event onPlayerJoined(player){
  5. pos = player.position;
  6. posx = math.ceil(pos.x);
  7. posy = math.ceil(pos.y);
  8. posz = math.ceil(pos.z);
  9. effectManager.sendUI(12715, 12715, player.id, "X:" + posx + " Y:" + posy + " Z:" + posz);
  10. }
  11.  
  12. event onInterval(1){
  13. foreach(player in server.players){
  14. if(UI == 1){
  15. pos = player.position;
  16. posx = math.ceil(pos.x);
  17. posy = math.ceil(pos.y);
  18. posz = math.ceil(pos.z);
  19. effectManager.sendUI(12715, 12715, player.id, "X:" + posx + " Y:" + posy + " Z:" + posz);
  20. }
  21. }
  22. }
  23.  
  24. command fps(){
  25. permission = "fps";
  26. execute(){
  27. if(UI == 1){
  28. effectManager.clearUIbyID(12715, player.id);
  29. player.message("You now hide the coords");
  30. UI = 0;
  31. return;
  32. }
  33. if(UI == 0){
  34. UI = 1;
  35. player.message("You now show the coords");
  36. }
  37. }
  38. }
  39.  
  40. command sethome(){
  41. permission = "sethome";
  42. execute(){
  43. pos = player.position;
  44. if(home == 0){
  45. player.message("Now set the home!");
  46. home = pos;
  47. }
  48. if(home >= 1){
  49. player.message("You already have a home!");
  50. }
  51. }
  52. }
  53.  
  54. command delhome(){
  55. permission = "delhome";
  56. execute(){
  57. home = 0;
  58. player.message("You are deleted your home!");
  59. }
  60. }
  61.  
  62. command GoHome(){
  63. permission = "tp.home";
  64. execute(){
  65. player.teleport(home);
  66. player.message("You now in your home!");
  67. }
  68. }
  69.  
  70. command WhereHome(){
  71. permission = "tp.select";
  72. execute(){
  73. if(home >= 1){
  74. player.setMarker(home);
  75. player.message("Your home are marker in your map!");
  76. }
  77. }
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement