Advertisement
Guest User

Warns Script

a guest
May 26th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. command /warn [<offline player>] [<text>]:
  2. permission: warn
  3. permission message: &eInsufficient Permissions.
  4. trigger:
  5. if argument 1 is not set:
  6. send "&6&lPUNISHMENTS &8- &7Usage: &e/warn <player> <reason> [-s]"
  7. else:
  8. if argument 2 is not set:
  9. add 1 to {warns.%arg-1%}
  10. broadcast "&6&lPUNISHMENTS &8- &e%player% &7warned &e%arg-1% &7for &eN/A&7. &7&8[&7%{warns.%arg-1%}%&8]"
  11. add "N/A" to {warnreasons.%arg-1%::*}
  12. else:
  13. if argument 2 contains "-s":
  14. if argument 2 is "-s":
  15. set {_arg2} to argument 2
  16. replace all " -s" in {_arg2} with "&7."
  17. add 1 to {warns.%arg-1%}
  18. loop all players:
  19. if loop-player has the permission "notify":
  20. send "&7[Silent] &6&lPUNISHMENTS &8- &e%player% &7warned &e%arg-1% &7for &eN/A&7. &7&8[&7%{warns.%arg-1%}%&8]" to loop-player
  21. add "N/A" to {warnreasons.%arg-1%::*}
  22. send "&6&lPUNISHMENTS &8- &e%player% &7warned &e%arg-1% &7for &eN/A &7&8[&7%{warns.%arg-1%}%&8]" to argument 1
  23. else:
  24. set {_arg2} to argument 2
  25. replace all " -s" in {_arg2} with "&7."
  26. add 1 to {warns.%arg-1%}
  27. loop all players:
  28. if loop-player has the permission "notify":
  29. send "&7[Silent] &6&lPUNISHMENTS &8- &e%player% &7warned &e%arg-1% &7for &e%{_arg2}%&7 &7&8[&7%{warns.%arg-1%}%&8]" to loop-player
  30. add argument 2 to {warnreasons.%arg-1%::*}
  31. send "&6&lPUNISHMENTS &8- &e%player% &7warned &e%arg-1% &7for &e%{_arg2}% &7&8[&7%{warns.%arg-1%}%&8]" to argument 1
  32. else:
  33. add 1 to {warns.%arg-1%}
  34. add argument 2 to {warnreasons.%arg-1%::*}
  35. broadcast "&6&lPUNISHMENTS &8- &e%player% &7warned &e%arg-1% &7for &e%arg-2%&7. &7&8[&7%{warns.%arg-1%}%&8]"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement