Solved Teleport all players to a location if true

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

JrapS

Member
Apr 2, 2022
1
0
1
18
Hello,
I'm making a minigame.
for this minigame i need to do teleport all players to another locations like "Komutcu", or "Gardiyan" or "Oyuncu" I tryed to make it but i can't do :/ I'm almost new at skript.


Code:
on respawn:
  if {komutcu.%player%} is "true":
    loop {komutcu.}:    
      teleport loop-value to 201 157 472
    loop {gardiyan.%player%}:    
      teleport loop-value to 201 157 472
      else:
        teleport loop-value to 201 147 472

I tryed to do like that but it doesnt work :/ How can i make it?

With Regards,
 
Hello,
I'm making a minigame.
for this minigame i need to do teleport all players to another locations like "Komutcu", or "Gardiyan" or "Oyuncu" I tryed to make it but i can't do :/ I'm almost new at skript.


Code:
on respawn:
  if {komutcu.%player%} is "true":
    loop {komutcu.}:   
      teleport loop-value to 201 157 472
    loop {gardiyan.%player%}:   
      teleport loop-value to 201 157 472
      else:
        teleport loop-value to 201 147 472

I tryed to do like that but it doesnt work :/ How can i make it?

With Regards,
Code:
#This is a example because I don't know how yo join the mini game you can change this.
Command /join:
    Trigger:
        If {minigame::%player%} exists:
            Message "you already join the game"
        Else:
            Set {minigame::%player%} to true
            Message "you join mini game name"

Command /leave:
    Trigger:
        If {minigame::%player%} exists:
            Delete {minigame::%player%}
            Message "you leave mini game name"
        Else:
            Message "you are not in a game"

#idk how do you start the game but this is an example
Command /start:
    Trigger:
        Message "minigame started" to {minigame::*} # message all players inside the list
        Loop {minigame::*}:
            Teleport loop-value to {game} # you can set the game location
#set the game location
Command /setgamelocation:
    Trigger:
        Set {game} at the player's location
        Message "game location set at %{game}%"