Using FiveM's bucket system I created a resource that allows the server owners to create different sectors of the server. This gamestate-split feature exists in FiveM by default, I just made a resource so it can be used easier.
Client usage: /sectors command
All you have to do is edit the config file. I included a little documentation so you can understand it better. If you have any questions feel free to ask me in messages, or here under this post.
When the user joins another sector a client event gets triggered: “server_sector:changedSector”
RegisterNetEvent("server_sector:changedSector",function(newSector)
print("yay, I joined", newSector)
end)
Using this you can for example teleport the player somewhere else when they join let’s say the lobby! (newSector is the SectorId from the config)