Solved Skript minigame need code for arena start

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

AvantyCZ

Member
Jul 10, 2017
15
0
1
24
Hi SkUnity Users,
I need help with arena start code.
I'm currently coding a dragons minigame, everything works, but i don't know how to write command for arena start with full arena slots or automatically start.
Server version: 1.16.1

Code:
        if arg-1 is "join":
            if arg-2 is set:
                if {arena.%arg 2%} exist:
                    if {dgarenatoggle.%arg 2%} is true:
                        if {dg.join.%player%} is false:
                            if {dgarena.%arg 2%} is set:
                                if player's gamemode is survival:
                                    if {dg.players.%arg 2%} is less than 2:
                                        add 1 to {dg.players.%arg 2%}
                                        broadcast "{@DP} Hráč &c%sender% &7se připojil do arény &e%arg 2%. &8&l(&9%{dg.players.%arg 2%}%&f/&92&8&l)&7, připoj se také /{@dcmd} join"
                                        set {dg.join.%player%} to true
                                        set the player's food level to 10
                                        heal the player
                                        set the player's gamemode to survival
                                        clear player's inventory
                                        teleport player to {dgarena.%arg 2%}
                                    else:
                                        send "{@DP} Aréna je přeplněná."
                                else:
                                    send "{@DP} Sundej si creative pro připojení!"
                            else:
                                send "{@DP} Není nastaven spawn do arény, kontaktuj administrátory."
                        else:
                            send "{@DP} Již jsi připojen ve hře."
                    else:
                        send "{@DP} &cAréna je vypnuta, kontaktuj administrátory."
                else:
                    send "{@DP} Aréna s tímto názvem neexistuje."

        if arg-1 is "start":
            if arg-2 is set:
                if {dgarenatoggle.%arg 2%} is true:
                    if {arena.%arg 2%} exist:
                        if {dgarena.%arg 2%} is set:
                            if player's gamemode is survival:
                                if player has permission "dg.*":
                                    broadcast "{@DP} Administrátor &c%player% &7odstartoval arénu &e%arg 2%"
                                    set {dgstart.arena.%arg 2%} to true
                                    #code#                                       
                                else:
                                    send "{@DP} Nemáš dostatečné pravomoce."
                            else:
                                send "{@DP} Sundej si creative."
                        else:
                            send "{@DP} Není uložena spawn pozice arény."
                    else:
                        send "{@DP} Aréna s tímto názvem neexistuje."
                else:
                    send "{@DP} Aréna je vypnutá. /dg toggle &a%arg 2%"

Thx for any answers. :emoji_wink:
 
insert after line 16:
Code:
if {dg.players.%arg 2%} = 2:
    execute console comand "yourcommand start %arg-2%"
    #or copy and paste the code 'set {dgstart.arena.%arg 2%} to true' etc. here

Pokud něco vkládáš na skUnity, doporučil bych radši i texty přeložit. Pro ostatní to bude lepší :emoji_wink:
I hope this helps :emoji_wink:
 
  • Like
Reactions: AvantyCZ
Status
Not open for further replies.