RoutingBucket causing Solo Session

After 7 months of testing and attempting to identify the cause of the Solo Session issue.

Solo Session: The player is essentially alone on the server, unable to see any other players but can still read the chat and play “normally.”

After numerous validations, I have come to the conclusion that the RoutingBucket is the reason behind this problem. The reasons are outlined below:

1 - I have discussed this issue with several other server owners, and none of them have encountered this problem. However, none of these other servers utilize dimensions.

2 - Recently, I found a server that uses dimensions and also experiences the same problem. When a player changes dimensions, they enter a solo session.

3 - I have tried deactivating and modifying nearly every aspect of the server, but nothing has resolved the issue. However, we have never changed the RoutingBucket because it has always worked correctly.

Due to these reasons and the various tests we have conducted, we attempted to identify the difference between a player in a solo session and others. We concluded that the GetPlayerPed(source) becomes 0.

I keep seeing a lot of server owners that don’t even realize that they are having “problems” with routing buckets. It is always a single script that does something weird, like placing every single player into bucket 2006 for whatever reason. (I have a script that only works in a single bucket; usually 0; that’s why I know)

That being said, do you have any reproduction steps?

Did you check every script for Routing Buckets?

Yes…and that’s intended… since that’s usually what happens when you set a player alone in a routing bucket…

What is the issue, exactly? Players not seeing other entities (vehicles & peds)? That’s ok, since routing buckets need to be set up for entities as well, not just for players.

I essentially have a command where the player can choose which dimension they want to be in, for example, /dimension 33.

When they enter this ‘solo session,’ they can see NPCs, spawn vehicles; the only thing is that they can’t see other players who are in the same dimension as them.

They enter this solo session only when they switch dimensions. Even if they try to use this command again to switch to another dimension, they will be able to see other players by simply rejoining the server

Yes… that’s the literal purpose of routing buckets

The RoutingBucket proposal is for you to only see people who are in the same “dimension” as you. However, sometimes, when you switch the player to dimension 10, the player ends up in a solo session and is unable to see/render any players from the server (including other players in dimension 10). This issue persists even after subsequently changing dimensions, and it is only resolved by re-entering the server. This constitutes the bug that I am reporting.

Can you share the command? It sounds like it might not set the correct routing bucket, or it’s doing something else.

I believe it to be nearly impossible for the issue to lie in the command, given its simplicity

RegisterCommand('dimensao', function(source, args)
	local source = source
	if args[1] and tonumber(args[1]) then
		SetPlayerRoutingBucket(source, parseInt(args[1]))
	end
end)

And when the player is in Solo Session, GetPlayerPed(source) returns as 0, which makes no sense whatsoever

what does this function do? and why is it not just a tonumber(), since that is the number that you are checking in the if statement.

Are the players in the same routing bucket? Is GetPlayerRoutingBucket - FiveM Natives @ Cfx.re Docs showing the same bucket for them? Is /dimensao 0 fixing the bug?

Certainly, in the GetPlayerRoutingBucket(source) function, it is specified as the dimension it should be, and regarding parseInt(args[1]), it is because the args parameter comes as a string in the command, and the function requires an integer.