Hello. I want to create a "Queue system". So I write to get some hints about it. For example, suppose that players A and B exist, if player A executes the command "/matching join", it joins a queue; if player B executes the same command, B also joins the queue. If Player A and B are in the queue, I want the server to run "/pokebattle <PlayerA> <PlayerB>".
That way, when the command is executed, change the rating_on boolean to true, make sure the player is a bronze player, and add the player to the "B MATCHING PLAYER" list. But I question because this method is a mess.
What should I do? If you have code for a system like this, please let me know.
0
Hello. I want to create a "Queue system". So I write to get some hints about it. For example, suppose that players A and B exist, if player A executes the command "/matching join", it joins a queue; if player B executes the same command, B also joins the queue. If Player A and B are in the queue, I want the server to run "/pokebattle <PlayerA> <PlayerB>".
That way, when the command is executed, change the rating_on boolean to true, make sure the player is a bronze player, and add the player to the "B MATCHING PLAYER" list. But I question because this method is a mess.
What should I do? If you have code for a system like this, please let me know.