Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /tempban [<offline player>] [<text>] [<timespan>]:
- permission: mod
- permission message: &6Insufficient Permissions.
- trigger:
- if argument 1 is not set:
- send "&6&lPUNISHMENTS &8- &7Usage: &6/tempban <player> [<reason>] <timespan> [-s]"
- else:
- if argument 2 is not set:
- send "&6&lPUNISHMENTS &8- &7Usage: &6/tempban <player> [<reason>] <timespan> [-s]"
- else:
- if argument 2 is "-s":
- loop all players:
- if loop-player has the permission "rank.helper":
- send "&7[Silent] &6&lPUNISHMENTS &8- &6%player% &7tempbanned &6%arg-1% &7for &6%arg-3% &7for &6N/A&7." to loop-player
- kick argument 1 because "&6&lPUNISHMENTS &8- &6%player% &7tempbanned &6You &7for &6%arg-3% &7for &6N/A&7."
- set {tempban.%arg-1%} to now
- set {tempbantime.%arg-1%} to argument 3
- stop
- else:
- if argument 2 contains "-s":
- set {_arg2} to argument 2
- replace all " -s" in {_arg2} with "&7."
- loop all players:
- if loop-player has the permission "rank.helper":
- send "&7[Silent] &6&lPUNISHMENTS &8- &6%player% &7tempbanned &6%arg-1% &7for &6%arg-3% &7for &6%{_arg2}%"
- set {tempban.%arg-1%} to now
- set {tempbantime.%arg-1%} to argument 3
- kick argument 1 because "&6&lPUNISHMENTS &8- &6%player% &7tempbanned &6You &7for &6%arg-3% &7for &6%{_arg2}%"
- else:
- kick argument 1 because "&6&lPUNISHMENTS &8- &6%player% &7tempbanned &6You &7for &6%arg-3% &7for &6%arg-2%&7."
- set {tempban.%arg-1%} to now
- set {tempbantime.%arg-1%} to argument 3
- broadcast "&6&lPUNISHMENTS &8- &6%player% &7tempbanned &6%arg-1% &7for &6%{tempbantime.%arg-1%}% &7for &6%arg-2%&7."
- on join:
- if {tempban.%player%} is set:
- set {_waited} to difference between {tempban.%player%} and now
- if {_waited} is less than {tempbantime.%player%}:
- set {_waited2} to difference between {tempbantime.%player%} and {_waited}
- kick player because "&6&lPUNISHMENTS &8- &6You &7are tempbanned for &6%{_waited2}%&7."
- else:
- delete {tempban.%player%}
- delete {tempbantime.%player%}
- command /unban [<offline player>] [<text>]:
- permission: mod
- permission message: &6Insufficient Permissions.
- trigger:
- if argument 1 is not set:
- send "&6&lPUNISHMENTS &8- &7Usage: &6/unban <player> [-s]"
- else:
- if argument 2 is not set:
- broadcast "&6&lPUNISHMENTS &8- &6%player% &7unbanned &6%arg-1%&7."
- else:
- loop all players:
- if loop-player has the permission "rank.mod":
- send "&7[Silent] &6&lPUNISHMENTS &8- &6%player% &7unbanned &6%arg-1%&7." to loop-player
- delete {ban.%arg-1%}
- delete {banreason.%arg-1%}
- delete {tempbantime.%arg-1%}
- delete {tempban.%arg-1%}
- unban argument 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement