[Help] Skript Queue

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

Hat

Member
May 2, 2020
2
0
0
23
Hey I created a queue for a game that I'm trying to make, and i want it to teleport all queued players within 30 seconds to a location (if there are 2 players).

My current Skript:

command /join:
trigger:
if {Queue::*} does not contain player:
add player to {Queue::*}
send "&7You joined the queue."
execute player command "warp Lobby"
else:
send "&7You are already queued. To leave type &f/leave&7."

command /queue:
trigger:
send "&7Players in queue: %{Queue::*}%"

command /leave:
trigger:
remove player from {Queue::*}
send "&7You are no longer queued!"
 
What skript version are you using?

If its the same as mine, this should work:

Code:
command /join:
  trigger:
    if {Queue::*} does not contain player:
      add player to {Queue::*}
      send "&7You joined the queue."
      if size of {Queue::*} is greater than 1:
        teleport {Queue::*} to {pvpspawn}
    else:
      send "&7You are already queued. To leave type &f/leave&7."

command /setpvpspawn:
  permission: op
  trigger:
    set {pvpspawn} to location of block at location of player
    send "&6&lpvp spawn set!" to player
 
command /leave:
  trigger:
    remove player from {Queue::*}
    send "&7You are no longer queued!"

command /queue:
  trigger:
    send "&7Players in queue: %{Queue::*}%"
 
Last edited:
It worked! Thanks, but I need it to have 2 different spawns like teams and it randomly teleports the players to these 2 spawn points within the map. Sorry i forgot to mention that :emoji_frowning:
 
Status
Not open for further replies.