• 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.

Famix

New Member
Jun 6, 2019
9
0
1
24
Hello!
I have problem,
On my server i have 5 warps, but when i open the menu it teleports me to the warp that was last added.
Please help!
Code:
command /setwarp [<text>]:
    permission: warp.admin
    permission message: {@errorperm}
    trigger:
        if {@warp} is equal to 2:
            stop
        if arg 1 is not set:
            send "&b&lWARP &cNekde nastala chyba :("
        if arg 1 is set:
            set {warpssize::*} to size of {warps::*}
            if {warpssize::*} is less than 54:
                if {warp.%arg 1%} is not set:
                    add arg 1 to {warps::*}
                    set {warp.%arg%} to player's location
                    send "&b&lWARP &7Nastavil jsi warp!"
                else:
                    set {warp.%arg%} to player's location
                    send "&b&lWARP &7Nastavil jsi warp!"
            else:
                send "&b&lWARP &cUz je moc warpu!"

command /warp [<text>]:
    trigger:
        if {@warp} is equal to 2:
            stop
        if arg 1 is not set:
            execute player command "/warps"
        if arg 1 is set:
            if {warp.%arg%} is set:
                teleport player to {warp.%arg%}
                send "&b&lWARP &7Warpnul jsi se &8(&6%arg 1%&8)"
            else:
                send "&b&lWARP &cWarp neexistuje!"

command /delwarp [<text>]:
    permission: warp.admin
    permission message: {@errorperm}
    trigger:
        if {@warp} is equal to 2:
            stop
        if arg 1 is not set:
            send "&b&lWARP &cNekde nastala chyba :("
        if arg 1 is set:
            if {warp.%arg%} is set:
                remove arg 1 from {warps::*}
                delete {warp.%arg%}
                send "&b&lWARP &7Odstranil jsi warp &6%arg 1%"
            else:
                send "&b&lWARP &cWarp neexistuje!"

command /warps:
    trigger:
        if {@warp} is equal to 2:
            stop
        set {warpssize::*} to size of {warps::*}
        if {warpssize::*} is greater than 0:
            open chest with 6 rows named "&6&lWarp Menu" to player
            wait 2 ticks
            set {_list} to 0
            loop {warps::*}:
                format slot {_list} of player with paper named "%loop-value%" with lore "&7Klikni na me pro port do &c%loop-value%" to close then run [make player execute "/warp %loop-value%"]
                add 1 to {_list}
        else:
            send "&b&lWARP &cNejsou zadne warpy!"
 
Status
Not open for further replies.