Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- Warn_Prefix: &6[WARN]
- on join:
- if {warns.%uuid of player%} is not set:
- set {warns.%uuid of player%} to 0
- command /warn [<offline player>] [<text>]:
- trigger:
- if player doesn't have permission "skript.warn":
- send "{@Warn_Prefix} &7You don't have &epermission &7to execute this command."
- else:
- if arg-1 is set:
- add 1 to {warns.%uuid of player%}
- if arg-2 is set:
- broadcast "{@Warn_Prefix} &e%player% &7 has been warned &e%arg-1% &7for &e%arg-2%"
- set {warns.reason.%uuid of player%.%{warns.%uuid of player%}%} to arg-2
- else:
- broadcast "{@Warn_Prefix} &e%player% &7 has been warned &e%arg-1%"
- set {warns.reason.%uuid of player%.%{warns.%uuid of player%}%} to "(NOT GIVEN)"
- else:
- send "&cUsage: /warn <player> [reason]"
- command /checkwarn [<offline player>]:
- trigger:
- if arg 1 is not set:
- send "&7&m-----------&8< &6Warns &8>&7&m-----------"
- send ""
- set {_n_1} to 1
- loop {warns.%uuid of player%} times:
- send "&c%{_n_1}% &f- &a%{warns.reason.%uuid of player%.%{_n_1}%}%"
- add 1 to {_n_1}
- send ""
- send "&7&m------------------------------"
- else:
- send "&7&m-----------&8< &6Warns &8>&7&m-----------"
- send ""
- set {_n_2} to 1
- loop {warns.%uuid of arg-1%} times:
- send "&c%{_n_1}% &f- &a%{warns.reason.%uuid of arg-1%.%{_n_1}%}%"
- add 1 to {_n_2}
- send ""
- send "&7&m------------------------------"
- command /clearwarns [<offline player>] :
- trigger:
- if player doesn't have permission "skript.warn":
- send "{@Warn_Prefix} &7You don't have &epermission &7to execute this command."
- else:
- set {_n_3} to 1
- loop {warns.%uuid of arg-1%} times:
- clear {warns.reason.%uuid of player%.%{_n_1}%}
- add 1 to {_n_1}
- set {warns.%uuid of arg-1%} to 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement