70sOn7

Warn

Nov 8th, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. command /warn <player> [<text>]:
  2. permission: server.warn
  3. permission message: &cYou cannot do this command!
  4. trigger:
  5. if arg-1 is player"
  6. send "&cYou cannot warn yourself!"
  7. stop
  8. if arg-1 is not set:
  9. send "&c/warn (Player) (Reset/Remove/Reason/Check)"
  10. stop
  11. if arg-2 is not set:
  12. send "&c/warn %arg-1% (Reset/Remove/Reason/Check)"
  13. stop
  14. if arg-1 is set:
  15. if arg-2 is set:
  16. if arg-2 is "reset":
  17. set {warn.%arg-1%} to 0
  18. broadcast "&7&m------------------------------------------"
  19. broadcast "&e%player% &chas reset &e%arg-1%&e's &cwarns"
  20. broadcast "&7&m------------------------------------------"
  21. stop
  22. if arg-2 is "remove":
  23. if {warn.%player%} is more than 1:
  24. remove 1 from {warn.%arg-1%}
  25. broadcast "&7&m------------------------------------------"
  26. broadcast "&e%player% &chas removed 1 warn from &e%arg-1%&e's &cwarns"
  27. broadcast "&7&m------------------------------------------"
  28. stop
  29. if arg-2 is "check":
  30.  
  31. else:
  32. add 1 to {warn.%arg-1%}
  33. broadcast "&7&m------------------------------------------"
  34. broadcast "&e%player% &chas warned &e%arg-1%&e&c!"
  35. broadcast " &eReason: &c%arg-2%"
  36. broadcast "&7&m------------------------------------------"
  37. stop
  38.  
  39. every 1 tick:
  40. if {warn.%player%} is 3:
  41. make console execute "/essentials:tempban %player% 2h [Warn] To many warns!"
  42. remove 1 to {warn.%player%}
Add Comment
Please, Sign In to add comment