SkriptHelpNeeder Posted July 19, 2021 Share Posted July 19, 2021 hello! i have a queue system and need to pick a random player from the list. how? code: command /queue: permission: staff.use trigger: if {queue::*} does not contain player: add player to {queue::*} send "&7[&0Queue&7] You have &a&ljoined &7the queue." to player else: remove player from {queue::*} send "&7[&0Queue&7] You have &c&lleft &7the queue." to player Link to comment Share on other sites More sharing options...
StarBunnie Posted July 19, 2021 Share Posted July 19, 2021 4 minutes ago, SkriptHelpNeeder said: hello! i have a queue system and need to pick a random player from the list. how? code: command /queue: permission: staff.use trigger: if {queue::*} does not contain player: add player to {queue::*} send "&7[&0Queue&7] You have &a&ljoined &7the queue." to player else: remove player from {queue::*} send "&7[&0Queue&7] You have &c&lleft &7the queue." to player set {_player} to a random element out of {queue::*} Feel free to add me on discord if you: need help with plugins need help with skripts need to vent about something >[ ‧₊˚꒰ʚ Starshine ɞ ‧✦ *#2683 ]< Link to comment Share on other sites More sharing options...
SkriptHelpNeeder Posted July 19, 2021 Author Share Posted July 19, 2021 1 minute ago, StarBunnie said: set {_player} to a random element out of {queue::*} is there a way to make it pick the first person or no? Link to comment Share on other sites More sharing options...
StarBunnie Posted July 19, 2021 Share Posted July 19, 2021 6 minutes ago, SkriptHelpNeeder said: is there a way to make it pick the first person or no? set {_player} to first element of {queue::*} set {_player} to {queue::1} Not thaaat sure the first one works if it doesn't just take the second Feel free to add me on discord if you: need help with plugins need help with skripts need to vent about something >[ ‧₊˚꒰ʚ Starshine ɞ ‧✦ *#2683 ]< Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now