ign Posted September 25, 2020 Share Posted September 25, 2020 function q(p: player): if {q::*} doesn't contain {_p}: add {_p} to {q::*} if size of {q::*} = 1: set {_t} to 3 loop 3 times: wait 1 second if size of {q::*} = 1: broadcast "&8[&c»&8] &6The game is starting in &c%{_t}% &6seconds!" remove 1 from {_t} if {_t} is 0: add {q::*} to {onGoing::*} clear {q::*} broadcast "&8[&c»&8] &6The game has begun!" exit loop else: broadcast "&8[&c»&8] &6The queue has been stopped due to lack of people! &8[&c%(size of {q::*})%&8]" exit loop else: remove {_p} from {q::*} send "&8[&c»&8] &6You have left the queue! &8[&c%(size of {q::*})%&8]" to {_p} command q: trigger: q(player) Very simple queue script. Doesn't clear the "{onGoing::*}" variable, so may want to add that. It also doesn't teleport you anywhere, but it works in every other way. You can change whatever, I don't really care. I can breathe! 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