Skip to content

Connect a FiveM server (vMenu Enhanced) ​

SnowstormBot can link to a FiveM server that runs the vMenu Enhanced resource. Once linked, you can see who is online, watch them on a live map, and manage your server from the dashboard and Discord.

Paid plan required

This feature is included in every paid plan. See the plans page to pick one.

What you need ​

  • A FiveM server running vMenu Enhanced that starts without errors.
  • Access to vMenu's config file, vMenu/config/configuration.cfg, and the ability to restart the resource.

Your server and SnowstormBot share a secret key. Your server always connects out to the bot, never the other way around, so you do not need to open any ports or share your server's address.

Linking a server ​

You can link from the dashboard or from Discord. Both give you a key and a few lines to paste into your config.

  • Dashboard: go to Admin, then vMenu servers, click Add server, pick the Discord server, give it a name and click Add.
  • Discord: run /vmenu link name:My server in the Discord server you want to link. The bot replies only to you.

The key is only shown once, so copy it straight away. Paste the lines into configuration.cfg:

ini
set vMenu.Enhanced.Integration.ApiKey "the-key-you-were-given"
set vMenu.Enhanced.Integration.Endpoint "https://snowstormbot.net/api/vmenu"
set vMenu.Enhanced.Integration.AllowActions "true"

Then restart the vMenu.Enhanced resource.

Keep the key private

Use set, not setr. setr hands the key to every player who joins. Treat the key like a password.

SettingWhat it does
vMenu.Enhanced.Integration.ApiKeyThe shared secret. Empty switches the whole integration off.
vMenu.Enhanced.Integration.EndpointWhere your server connects to. For SnowstormBot this is always https://snowstormbot.net/api/vmenu.
vMenu.Enhanced.Integration.AllowActionsWhether the bot may make changes on your server, like kicking a player. Set it to "false" and the bot can only read and show things.

After a minute or two the dashboard shows the server as Online with a player count, and /vmenu status in Discord shows the same.

Features ​

  • Live player count: /vmenu playercount channel:#your-channel posts an embed that keeps itself up to date. /vmenu playercountremove takes it down again.
  • Who is online: /vmenu players gives you a private list of everyone on the server. Players who linked their Discord account and are in your Discord server show their Discord tag too.
  • Live map: see every player on the map. Turn on Player names in the legend to keep names shown, and use the Players list to jump to someone.
  • Heatmap: turn on Heatmap above the live map to see where players spent the most time over the last 72 hours. Drag the two handles of the time bar to pick the start and end of the window you want to look at, for example only last night, and the opacity slider makes the overlay lighter or stronger. It is always off when you open the map. Only roles with the Show the player heatmap permission see it, and it never shows on a share link.
  • Follow a player: click a player and choose Follow player to keep the map centered on them. Dragging the map stops following.
  • Player actions: click a player on the map to open their panel. The actions are sorted into groups (Locations, Player, Message and Moderation) that you can fold away with a click. You only see what your permissions allow. The result of each action shows in a bar at the bottom of the panel, so the buttons never jump around while you click.
  • Check status: in the Moderation group, Check status opens a window with the player's health, armor, god mode, current weapon, position and rotation. When they are in a vehicle it also shows the vehicle's name, god mode, health, position and rotation.
  • Delete or explode a vehicle: also in the Moderation group. These act on the vehicle the player is sitting in. Press the button twice to confirm, so a misclick does nothing.
  • Teleport locations: in the Locations group you can pick one of your server's saved teleport locations (the same list players see in the vMenu teleport menu). Type to search, and the locations are shown under their category.
  • Player position: the panel shows where the player is in the game world, as x, y and z. Click it to copy the numbers.
  • Waypoint or teleport everyone: right-click the map to set a waypoint for every player, or teleport everyone to a spot. Each has its own permission, and teleporting asks you to confirm first.
  • Share links: on the Live map tab, create a view-only link to the map that works without signing in, for example for a stream overlay. You pick how long it lasts and which Discord roles it shows. Players who are not in your Discord server are never shown on a share link. You can open the link in an OBS browser source, or embed it in an overlay tool that shows web pages in a frame.
  • Allowlist and join queue: control who can join, and let players wait in line. See below.
  • Discord role sync: let Discord roles give in-game permission groups. See below.

Who can use what is set on the Permissions tab.

Allowlist and join queue ​

Turn them on with these lines on your server. Everything else is set on the Allowlist and Join queue tabs in the dashboard.

cfg
set vMenu.Enhanced.Integration.Allowlist true
set vMenu.Enhanced.Integration.Queue true

Allowlist. Pick the Discord roles that may join. Anyone else is turned away with the message in vMenu.Enhanced.Integration.AllowlistMessage. The vMenu.Enhanced.Integration.Allowlist.Bypass Ace permission lets people in even when Discord or the bot is offline.

Join queue. Set a player cap (0 uses your server's own limit), create priority queues in order, and choose which roles go in each. You can also pick roles that skip the queue, turn on spike protection so a rush of players after a restart is let in slowly, and set a reconnect window so someone who crashes keeps their spot. The help button on the tab explains every setting. Use the vMenu.Enhanced.Integration.Queue.Bypass Ace permission to skip the queue from your permissions.cfg.

Waiting players see their place in line, an estimated wait while spike protection is holding them, and a notice when the server is full. On the Join Queue tab you can see who is waiting and let them through or kick them. /vmenu queueembed posts a live queue status in any channel.

Discord role sync ​

Role sync gives players in-game permission groups (like group.admin or group.vip) based on their Discord roles. Groups are added when a player joins, change right away when their roles change, and are removed when they leave the game or your Discord server.

  1. On the Discord role sync tab, click Add a role, pick a role, type one or more group names and click Save role sync.

  2. Make sure set vMenu.Enhanced.Integration.AllowActions true is on your server.

  3. Make sure these two lines are in your permissions.cfg. They are already in vMenu's example file:

    cfg
    add_ace resource.vMenu.Enhanced command.add_principal allow
    add_ace resource.vMenu.Enhanced command.remove_principal allow
  4. Restart your server.

If something is missing, the tab tells you what. Be careful who can edit role sync, because they can give any role group.admin, including their own.

Do not add the same group by hand as well

If you also give someone the same group in your permissions.cfg, role sync removes it when they leave or lose the role. Pick one way for each person and group.

What gets written to the audit log ​

Every action that changes a setting or affects a player is written to your server's audit log, with who did it and when:

  • Player actions from the live map: teleport, heal, armor, noclip, spawning a vehicle, deleting or exploding their vehicle, kick and kill.
  • Teleporting everyone, sending an announcement, and changing the weather, weather cycle, blackout, snow or time.
  • Everything on the Worlds tab: creating, renaming, changing or deleting a world, and moving players between worlds.
  • Letting a player through the join queue, or kicking them from it.
  • Saving the join queue settings, the allowlist, role sync or a vMenu setting.

Small things like setting a waypoint, sending a notification or checking a player's status are left out. Actions that failed are not written.

Your players' data ​

  • What your server sends: each player's in-game name, session slot and ping, and their Discord ID if they linked it. While a map is open, also their live position. Once a minute it also sends anonymous counts of how often players stood in each 50 metre square of the map, for the heatmap. Those counts say nothing about who stood there. It never sends IP addresses for the map.
  • How long we keep it: live positions only exist while a map is open. Heatmap counts are kept for 72 hours. The player list clears about twenty minutes after your server goes quiet. Allowlist entries and player stats stay until you remove them or unlink the server. See the Privacy Policy for the details.
  • Share links are public: anyone with the link can see your players' live location. For each shown player they see the in-game name, server id, position, world and whether the player is in a vehicle. They never see Discord names or Discord IDs.
  • Telling your players is your job: if the law requires you to tell players their location can be shown, that is up to you as the server owner.
  • Data Processing Agreement: the first time you link a server, you accept our Data Processing Agreement.
  • Rotate key: use Rotate key in the dashboard if a key leaks. The old key stops working right away, so paste the new one into configuration.cfg and restart the resource.
  • Unlink: use Unlink in the dashboard, or /vmenu unlink name:My server in Discord. Then remove the set lines from your config.

Troubleshooting ​

The server shows as offline. Check that the server and the vMenu.Enhanced resource are running, and that the server can reach https://snowstormbot.net. A new link stays offline until you restart the resource with the key in place.

The server is online, but vMenu shows as not connected. Check that vMenu.Enhanced.Integration.ApiKey matches your key exactly, and that you restarted the resource after changing it. Also update vMenu Enhanced, since older versions can no longer connect.

It worked, then stopped after a while. Your server's clock is probably off by more than a few minutes. Every message is signed with the current time, so set your clock to sync automatically.

The vMenu console keeps saying "Socket closed right after connecting". Most of the time this means the same key is set on two servers, for example a test server that got a copy of your live server's config. Each server is only allowed one connection, so every time one of them connects, the other one gets disconnected, and they keep pushing each other off. Remove the key from the server that should not be linked, or link that server separately so it gets its own key.

I lost the key. Keys cannot be shown again. Use Rotate key to get a new one.