70sOn7

Mute

Apr 4th, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.01 KB | None | 0 0
  1. command /mute [<offlineplayer>] [<number>] [<text>] [<text>]:
  2. trigger:
  3. if player has permission "Your.Permission":
  4. if arg-1 is not set:
  5. send "&e/mute (Player) (Integer) (Time Amount) (Reason)"
  6. send " &7Ex: /mute Timmy103 3 Days Disrespect"
  7. stop
  8. if arg-2 is not set:
  9. send "&e/mute (Player) (Integer) (Time Amount) (Reason)"
  10. send " &7Ex: /mute Timmy103 3 Days Disrespect"
  11. stop
  12. if arg-3 is not set:
  13. send "&e/mute (Player) (Integer) (Time Amount) (Reason)"
  14. send " &7Ex: /mute Timmy103 3 Days Disrespect"
  15. stop
  16. if arg-4 is not set:
  17. send "&e/mute (Player) (Integer) (Time Amount) (Reason)"
  18. send " &7Ex: /mute Timmy103 3 Days Disrespect"
  19. stop
  20. if arg-3 is "s" or "sec" or "second" or "seconds":
  21. set {tm.%arg-1%} to arg 2
  22. set {im.%arg-1%} to true
  23. if arg-4 contains "-s":
  24. loop all players:
  25. send "&e[SILENT] &e%player% &7muted &e%arg-1% &7for &e%arg-4% &e[%arg-2% SECONDS]" loop-player
  26. else:
  27. broadcast "&e[MUTE] %player% &7muted &e%arg-1% &7for &e%arg-4% &e[%arg-2% SECONDS]
  28. add arg 1 to {bpm::*}
  29. if arg-3 is "m" or "min" or "minute" or "minutes":
  30. set {tm.%arg-1%} to arg 2 * 60
  31. set {im.%arg-1%} to true
  32. if arg-4 contains "-s":
  33. loop all players:
  34. send "&e[SILENT] &e%player% &7muted &e%arg-1% &7for &e%arg-4% &e[%arg-2% MINUTES]" loop-player
  35. else:
  36. broadcast "&e[MUTE] %player% &7muted &e%arg-1% &7for &e%arg-4% &e[%arg-2% MINUTES]
  37. add arg 1 to {bpm::*}
  38. if arg-3 is "h" or "hour" or "hours":
  39. set {tm.%arg-1%} to arg 2 * 3600
  40. set {bd.%arg-1%} to now
  41. if arg-4 contains "-s":
  42. loop all players:
  43. send "&e[SILENT] &e%player% &7muted &e%arg-1% &7for &e%arg-4% &e[%arg-2% DAYS]" loop-player
  44. else:
  45. broadcast "&e[MUTE] %player% &7muted &e%arg-1% &7for &e%arg-4% &e[%arg-2% DAYS]
  46. add arg 1 to {bpm::*}
  47. if arg-3 is "d" or "day" or "days":
  48. set {tm.%arg-1%} to arg 2 * 86400
  49. set {im.%arg-1%} to true
  50. if arg-4 contains "-s":
  51. loop all players:
  52. send "&e[SILENT] &e%player% &7muted &e%arg-1% &7for &e%arg-4% &e[%arg-2% WEEKS]" loop-player
  53. else:
  54. broadcast "&e[MUTE] %player% &7muted &e%arg-1% &7for &e%arg-4% &e[%arg-2% WEEKS]
  55. add arg 1 to {bpm::*}
  56. if arg-3 is "w" or "week" or "weeks":
  57. set {tm.%arg-1%} to arg 2 * 604800
  58. set {im.%arg-1%} to true
  59. if arg-4 contains "-s":
  60. loop all players:
  61. send "&e[SILENT] &e%player% &7muted &e%arg-1% &7for &e%arg-4% &e[%arg-2% WEEKS]" loop-player
  62. else:
  63. broadcast "&e[MUTE] %player% &7muted &e%arg-1% &7for &e%arg-4% &e[%arg-2% WEEKS]"
  64. add arg 1 to {bpm::*}
  65. else:
  66. send "You don't have the required permission to use this command"
  67.  
  68. every second:
  69. loop {bpm::*}:
  70. remove 1 from {tm.%loop-value%}
  71. if {tm.%loop-value%} is 0:
  72. remove loop-value from {bpm::*}
  73. delete {im.%loop-value%}
  74. send "&e[MUTE] &7Your have been &eunmuted!" to loop-value
  75.  
  76. on chat:
  77. if {im.%player%} is true:
  78. send "&cYou are currently muted!"
  79. cancel event
Add Comment
Please, Sign In to add comment