Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /warn [<offline player>] [<text>]:
- permission: warn
- permission message: &eInsufficient Permissions.
- trigger:
- if argument 1 is not set:
- send "&6&lPUNISHMENTS &8- &7Usage: &e/warn <player> <reason> [-s]"
- else:
- if argument 2 is not set:
- add 1 to {warns.%arg-1%}
- broadcast "&6&lPUNISHMENTS &8- &e%player% &7warned &e%arg-1% &7for &eN/A&7. &7&8[&7%{warns.%arg-1%}%&8]"
- add "N/A" to {warnreasons.%arg-1%::*}
- else:
- if argument 2 contains "-s":
- if argument 2 is "-s":
- set {_arg2} to argument 2
- replace all " -s" in {_arg2} with "&7."
- add 1 to {warns.%arg-1%}
- loop all players:
- if loop-player has the permission "notify":
- 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
- add "N/A" to {warnreasons.%arg-1%::*}
- send "&6&lPUNISHMENTS &8- &e%player% &7warned &e%arg-1% &7for &eN/A &7&8[&7%{warns.%arg-1%}%&8]" to argument 1
- else:
- set {_arg2} to argument 2
- replace all " -s" in {_arg2} with "&7."
- add 1 to {warns.%arg-1%}
- loop all players:
- if loop-player has the permission "notify":
- 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
- add argument 2 to {warnreasons.%arg-1%::*}
- send "&6&lPUNISHMENTS &8- &e%player% &7warned &e%arg-1% &7for &e%{_arg2}% &7&8[&7%{warns.%arg-1%}%&8]" to argument 1
- else:
- add 1 to {warns.%arg-1%}
- add argument 2 to {warnreasons.%arg-1%::*}
- 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