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 community!
Now, what are you waiting for? Join the community now!
You can always check out skUnity Downloads for downloads and any other information about Skript!
Do you have code? if not, then this is not me helping you, this is a request. in that case, I would recommend reposting this in the right section (and deleting this post).I want to make a queue system, if 2 players are in a queue then one player will auto execute a command and the other player will be auto teleported to him.
(the players will be removed from the queue after they get teleported)
Could anybody help me with that?
I can help, though.I want to make a queue system, if 2 players are in a queue then one player will auto execute a command and the other player will be auto teleported to him.
(the players will be removed from the queue after they get teleported)
Could anybody help me with that?
I LITERALLY JUST FINISHED AND IT WIPED MY PROGRESSI want to make a queue system, if 2 players are in a queue then one player will auto execute a command and the other player will be auto teleported to him.
(the players will be removed from the queue after they get teleported)
Could anybody help me with that?
It is done. In fact, it is right here.I want to make a queue system, if 2 players are in a queue then one player will auto execute a command and the other player will be auto teleported to him.
(the players will be removed from the queue after they get teleported)
Could anybody help me with that?
Btw, if you ever decide to send me your current code, I could make the code that I have compatible.I want to make a queue system, if 2 players are in a queue then one player will auto execute a command and the other player will be auto teleported to him.
(the players will be removed from the queue after they get teleported)
Could anybody help me with that?
I‘ve had a code but I deleted it since it didn’t workBtw, if you ever decide to send me your current code, I could make the code that I have compatible.
I can‘t see wehre the first player or second player execute anything, I meanIt is done. In fact, it is right here.
OhhhhhhhhI can‘t see wehre the first player or second player execute anything, I mean
- if 2 players are in a queue then one will execute the command /rtp (random teleport plugin) and then the second will be auto teleported to the first player who auto executed /rtp
(I don’t need a location in the queue)
I’m very new at Skript and just starting to learn it and queue is some stuff that I can’t do currently, so yeah I’m requesting a Skript
All good, but still thank you that you’re trying to helpOhhhhhhhh
Yeah, that's do-able. My bad, I didn't understand what you wanted.
I'll try to finish it fast before I leave for school. (At least it's Friday...)All good, but still thank you that you’re trying to help
on load:
if {numqueue} is not set:
set {numqueue} to 2
command /queue:
trigger:
if {queue::%player%} <= 0:
if {queue::*} = {numqueue}:
set {queue::*} to 0
send "&7Teleporting..." to {queuetp::*}
teleport {queuetp::*} to {loc}
clear {queuetp::*}
else:
send "&aYou have been added to the queue!"
add 1 to {queue::%player%}
set {queuetp::%player%} to player
else:
send "&cYou are already in this queue!" to player
command /setloc:
permission: op
trigger:
set {loc} to player's location
send "&aSuccessfully set location to &3%{loc}%&a."
command /setqueue <number>:
usage: &cAdd a number to set a queue! the default number is 2.
permission: op
trigger:
set {numqueue} to arg-1
send "&aSuccessfully set queue to &3%{numqueue}%&a."
on load:
if {numqueue} is not set:
set {numqueue} to 2
loop all players:
if {queueset::%loop-player's uuid%} is not set:
set {queueset::%loop-player's uuid%} to false
else:
exit loop
command /queue:
trigger:
if {queueset::%player's uuid%} is false:
if {queue::*} >= {numqueue}:
set {queue::*} to 0
send "&7Teleporting..." to {queuetp::*}
execute player command "/rtp"
teleport {queuetp::*} to player
clear {queuetp::*}
set {queueset::*} to false
else:
send "&aYou have been added to the queue!"
set {queueset::%player's uuid%} to true
set {queuetp::%player's uuid%} to player
add 1 to {queue::*}
else:
send "&cYou are already in this queue!" to player
command /setqueue <number>:
usage: &cAdd a number to set a queue! the default number is 2.
permission: op
trigger:
set {numqueue} to arg-1
send "&aSuccessfully set queue to &3%{numqueue}%&a."
command /resetqueue:
permission: op
trigger:
clear {queuetp::*}
set {queue::*} to 0
set {queueset::*} to false
send "&aSuccessfully cleared queue!"
Oh wait wrong one. Hehe, here's the right one:
Code:on load: if {numqueue} is not set: set {numqueue} to 2 command /queue: trigger: if {queue::%player%} <= 0: if {queue::*} >= {numqueue}: set {queue::*} to 0 send "&7Teleporting..." to {queuetp::*} execute player command "/rtp" teleport {queuetp::*} to player clear {queuetp::*} else: send "&aYou have been added to the queue!" add 1 to {queue::%player%} set {queuetp::%player%} to player else: send "&cYou are already in this queue!" to player command /setqueue <number>: usage: &cAdd a number to set a queue! the default number is 2. permission: op trigger: set {numqueue} to arg-1 send "&aSuccessfully set queue to &3%{numqueue}%&a." command /resetqueue: permission: op trigger: clear {queuetp::*} clear {queue::*} send "&aSuccessfully cleared queue!"
Let me try and fix that.It says "You are already in the queue" when typing /queue