[Feature Request] Player Join Queue
Problem and first solution consideration
When joining a full server, the player gets rejected and has to refresh the server list constantly, if they want to get in. The alternative I propose is a queue, which a player joins as soon as they try to enter a full server.
Implementation Summary
When joining a full server, the server puts the player with all their data (sockets, name, id, etc.) into a queue. On onPlayerDisconnect, the queue is checked and, if not empty, the first player in the queue gets joined into the server like usual.
When the queue gets smaller (thus advancing everyone still in queue), each player gets notified via a reliable message that their position in the queue changed from X to Y.
While the player is waiting in queue, the client-side shows a dialog, allowing the player to see which place in the queue they are. An option exists for the player to cancel the queuing. Queuing is the default behavior.
When the server closes, the people in the queue automatically get kicked back to the server list. They get a normal disconnect packet, or something else, depending on what is specified.
Supported Activities
A1: Player joins a full server, gets put into a queue, gets an ID A2: Player advances in a queue A3: Player cancels the queuing A4: Server closes during queuing, disconnecting all players A5: Server API triggers moving a player in the queue (to the start, position X etc.)
API Events
onPlayerEnqueuetriggered on A1onPlayerQueueCanceltriggered on A3onPlayerMovedtriggered on A2, A5
API Functions
Lots of TODO here
MP.MovePlayerInQueue(player, newIndex)MP.GetQueueSize()MP.GetQueue()- ...
This sounds perfect. Are there plans to implement this some time?
From my side, yes, anytime, but @20dka, @Starystars67, @Anonymous-275 need to also do things for it, so it would be a coordinated effort.
Hey @lionkor I wonder if this maybe could be adjusted into a server-side mod written in lua, So what would happen is the player cap is set to something higher and then players who join past a configured value in the mod config would be set as spectators and when they try to spawn a vehicle the script cancels the spawn event before sending to other clients.
Just an idea.
Yeah, we could do that - but it should really be a core feature IMO
Yeah, we could do that - but it should really be a core feature IMO
Fair enough, was just an idea and a possible option to reduce work but if you are happy for it then I am too :)
Hey @lionkor I wonder if this maybe could be adjusted into a server-side mod written in lua, So what would happen is the player cap is set to something higher and then players who join past a configured value in the mod config would be set as spectators and when they try to spawn a vehicle the script cancels the spawn event before sending to other clients.
Just an idea.
This has been a feature of Cobalt Essentials for a very very long time
Yes, and it's also completely different from the point of the issue, please let's keep it ontopic from now on
@Anonymous-275 I believe this is something that needs to be handled by the Launcher and then Joining messages can be provided to the game the same way progress for mod download is done.
Assuming the work for this was done in the server side already then this can be ready to be moved on and closed off?
No work was done server-side, since a protocol was not agreed upon iirc
Okay, Lets see if we can document something here and go from there?