Jump to content
  • 0

I need help with a skript i made and i dont know the problem with /ban


Ramina__

Question

and /ban [<offlineplayer>] [<text>]:
    trigger:
        if player does not have permission "ban.use":
            send "&cYou are not permitted to run this command!"
            stop
        if arg-1 is not set:
            send "&c/ban (player) [reason] [-s]"
            stop
        if arg-1 has permission "ban.use":
            send "&cThat player cannot be banned!"
            stop
        if player is not set:
            set {_p} to "CONSOLE"
        else:
            set {_p} to player
        if arg-1 is banned:
            send "&cThat player is already banned!"
            stop
        if arg-2 is not set:
            set {_r} to "N/A"
        else:
            set {_r} to arg-2
        if {_r} contains "-s":
            replace all " -s" and "-s " with "" in {_r}
            set {_silent} to true
        if {_silent} is set:
            loop all players:
                if loop-player has permission "ban.use":
                    send "&7&o(SILENT) &b%{_p}% &7banned &b%arg-1% &7for &c%{_r}% &7[FOREVER]" to loop-player
        else:
            broadcast "&b%{_p}% &7banned &b%arg-1% &7for &c%{_r}% &7[FOREVER]"
        ban arg-1 due to {_r}
        if arg-1 is online:
            kick arg-1 due to "&7You are now banned! &bReason: &7%{_r}%"
        add arg-1 to {banlist::*}

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...