[MULTIVERSE Scripts] Multiverse-World-Manager

Multiverse-World-Manager

Multiverse Logo

A FiveM Script taking advantage of routing buckets

What is it?

Multiverse-World-Manager is part of a new series of FiveM scripts I will be releasing. It’s essentially an idea I took from a very popular Minecraft plugin named Multiverse. This script essentially allows a server to have multiple worlds within their FiveM server. It’s not actually different worlds, but different routing buckets (something the FiveM collective added a while ago). Players can change to different worlds depending on permissions and/or pick the world they want to load in at the loading screen (via AdaptiveCards).

I plan on releasing more Multiverse scripts, so make sure you keep a look out! The next script will probably be a Chat Manager to coordinates the chats between the different worlds.

Screenshots

Commands

/world <worldName> - This will teleport the player to this world and set their routing bucket to it.

Configuration

Config = {
    Worlds = { -- ["WorldName"] = {RoutingBucket, Spawnpoint, PermissionRequired},
        ["Normal"] = {0, { 311.22, 3457.60, 36.15 }, false}, -- DO NOT REMOVE
        ["Donator"] = {1, { -269.34, 6628.99, 7.55 }, "Permission.Donator"},
        ["PVP"] = {2, { -1037.48, -2737.40, 20.17 }, false},
        ["PVP2"] = {3, { 1967.2, 3736.52, 32.21 }, false},
    },
    Messages = {
        ["WORLD_CHANGED"] = "Your world has been changed to {WORLD}", -- Set this to false if you do not want this message to be a thing
        ["WORLD_DOES_NOT_EXIST"] = "This world does not exist!",
        ["NO_PERMISSION"] = "You do not have permission to access this world..."
    },
    LoadingScreen = {
        Enabled = true,
        Banner = "https://i.gyazo.com/fde6f4f7595f80ea1948bb4034a58f8b.png",
        Title = "Welcome to our server!",
        Description = "Select the world you would like to join down below...",
        DisplayedWorlds = {
            ["RP World"] = {"Normal"},
            ["Donator World"] = {"Donator"},
            ["PVP World"] = {"PVP"},
        },
    }
}

RoutingBucket can be any digit from 0 to 63. 0 is the default routing bucket, meaning it’s essentially the default route for FiveM.

Spawnpoint is the coordinates of where the player should be teleported upon respawn and joining the world. Format: { x, y, z }

PermissionRequired is the ACE permission required to be able to join the world. You can put false if you want everyone to have access to the world.

Download

18 Likes

So this can basicly be used for restricted spawn selection right, Like say Cops can press the cops world button and they will load at the set location like a station as example?

You could use it that way too. You could essentially forget about routing buckets and just use it as a spawn location selector too if you’d like :+1:

1 Like

so i have a replacement map for fivem, that replaces the lossantos map to the liberty city map, I been trying to think of away someone could take a plane ticket to liberty city. How would I set up a 2nd world? I think this might do the trick. To ramble on a little bit, there is a north yankton script that lets people buy plane tickets and travel to north yankton… With your system it looks like I could achieve the same thing, by just putting my libertycity replacement on the 2nd world…

1 Like

Well the worlds don’t actually include different map replacements. The different worlds are essentially just different routing buckets. You won’t see other players if you aren’t in the same routing bucket, but maps will still be seen from my understanding.

gottcha, I about leaped out of my chair with excitement!! haahha This does sound like a cool way to have different levels of users though. Keep up the good work

1 Like

It says Multiverse: Deferring Connection for like 10 mins now.

Fixed the Deferring connection problem. Only thing is we could still see each other when we joined different worlds.

SCRIPT ERROR: @Multiverse/server.lua:125: attempt to call a nil value (global ‘SetPlayerRoutingBucket’)

1 Like

You have to be on a certain pipeline and higher for this to work

Alright the error went away but we can still see each other when joining different worlds. I have the newest pipeline.

Perfect script
This is really amazing!!!

Need to be extremely higher?

I have the same error on my cmd, but I couldn’t fix it.

how did you fix this?

So to fix the error update your server files. My only problem now is that I can still see other people in other worlds. @OfficialBadger

You need to be on a certain pipeline or higher

I’m on the highest one. @OfficialBadger

1 Like

my server files are the latest and i still have the problem :slightly_frowning_face:

Me too, but still doesn’t work