SHARE
TWEET

Untitled

Gusted Oct 22nd, 2019 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. options:
  2.     Warn_Prefix: &6[WARN]
  3.  
  4. on join:
  5.     if {warns.%uuid of player%} is not set:
  6.         set {warns.%uuid of player%} to 0
  7. command /warn [<offline player>] [<text>]:
  8.     trigger:
  9.         if player doesn't have permission "skript.warn":
  10.             send "{@Warn_Prefix} &7You don't have &epermission &7to execute this command."
  11.         else:
  12.             if arg-1 is set:
  13.                 add 1 to {warns.%uuid of player%}
  14.                 if arg-2 is set:
  15.                     broadcast "{@Warn_Prefix} &e%player% &7 has been warned &e%arg-1% &7for &e%arg-2%"
  16.                     set {warns.reason.%uuid of player%.%{warns.%uuid of player%}%} to arg-2
  17.                 else:
  18.                     broadcast "{@Warn_Prefix} &e%player% &7 has been warned &e%arg-1%"
  19.                     set {warns.reason.%uuid of player%.%{warns.%uuid of player%}%} to "(NOT GIVEN)"
  20.             else:
  21.                 send "&cUsage: /warn <player> [reason]"
  22.  
  23. command /checkwarn [<offline player>]:
  24.     trigger:
  25.         if arg 1 is not set:
  26.             send "&7&m-----------&8< &6Warns &8>&7&m-----------"
  27.             send ""
  28.             set {_n_1} to 1
  29.             loop {warns.%uuid of player%} times:
  30.                 send "&c%{_n_1}% &f- &a%{warns.reason.%uuid of player%.%{_n_1}%}%"
  31.                 add 1 to {_n_1}
  32.             send ""
  33.             send "&7&m------------------------------"
  34.         else:
  35.             send "&7&m-----------&8< &6Warns &8>&7&m-----------"
  36.             send ""
  37.             set {_n_2} to 1
  38.             loop {warns.%uuid of arg-1%} times:
  39.                 send "&c%{_n_1}% &f- &a%{warns.reason.%uuid of arg-1%.%{_n_1}%}%"
  40.                 add 1 to {_n_2}
  41.             send ""
  42.             send "&7&m------------------------------"
  43.  
  44. command /clearwarns [<offline player>] :
  45.     trigger:
  46.         if player doesn't have permission "skript.warn":
  47.             send "{@Warn_Prefix} &7You don't have &epermission &7to execute this command."
  48.         else:
  49.             set {_n_3} to 1
  50.             loop {warns.%uuid of arg-1%} times:
  51.                 clear {warns.reason.%uuid of player%.%{_n_1}%}
  52.                 add 1 to {_n_1}
  53.             set {warns.%uuid of arg-1%} to 0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top