viewing paste Unknown #11949 | Text

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
        if argument 1 is "join":
            if argument 2 is set:
                if {tcoh.arena.%player%} is not set:
                    loop {tcoh.arenas::*}:
                        add player to {tcoh.list.%argument 2%::*}
                        loop-value is arg 2
                        set {tcoh.arena.%player%} to argument 2
                        set {tcoh.player.count.%{tcoh.arena.%player%}%} to {tcoh.player.count.%{tcoh.arena.%player%}%}+1
                        send "%{_prefix}% &aYou have joined &2%argument 2%&a."
                        teleport player to {tcoh.map.%{tcoh.arena.%player%}%.Lobby}
                        stop
                    send "%{_prefix}% &cThat arena doesn't exists."
                else:
                    message "You cannot join a game you are already in."
            else:
                message  "%{_prefix}% &aYou have joined the lobby."
                teleport player to {tcoh.spawns.lobby}
 
        if argument 1 is "leave":
            if player has permission "tcoh.command.player":
                if {tcoh.arena.%player%} is not set:
                    message "%{_prefix}% &cYou can not leave a game you are not in."
                    stop
                if {tcoh.arena.%player%} is set:
                    remove player from {tcoh.list.%{tcoh.arena.%player%}%::*}
                    remove 1 from {tcoh.joinedtotal.%{tcoh.arena.%player%}%}
                    set line 3 of {tcoh.map.SignLocation::%{tcoh.arena.%player%}%} to "%{tcoh.joinedtotal.%{tcoh.arena.%player%}%}%/%{tcoh.settings.max player requirement::*}%"
                    message "%{_prefix}% &aYou have left from &2%{tcoh.arena.%player%}%&a."
                    delete {tcoh.ingame.%player%::*}
                    teleport the player to {tcoh.spawns.lobby}
                    delete {tcoh.arena.%player%}
                    stop
Viewed 852 times, submitted by Guest.