Bridge is in a state of development and is not stable.
RAGE:MP to FiveM Bridge

Getting Started

Install the bridge as a shared FiveM resource and run your RAGE:MP gamemode with @-imports.

This guide explains how to install ragemp-fivem-bridge as a shared FiveM resource and run your RAGE:MP gamemode using @ imports.

Prerequisites

Before you start, make sure you have:

  • A working FiveM server.
  • An existing RAGE:MP gamemode.
  • Access to your FiveM resources folder.
  • A built version of your TypeScript gamemode, if your project uses TypeScript.

Download the bridge

Download ragemp-fivem-bridge-vx.x.x.zip from the latest release.

Unzip the archive and place the extracted ragemp-fivem-bridge folder inside your FiveM resources folder.

  1. git clone https://github.com/adriantandara/ragemp-fivem-bridge.git
  2. pnpm install
  3. pnpm build:resource
  4. Copy the resource from /dist/ragemp-fivem-bridge to resources

Create your gamemode resource

Inside the resources folder, create a new folder for your gamemode. For example:

resources/gamemode

Then create an fxmanifest.lua file inside resources/gamemode:

fxmanifest.lua
fx_version 'cerulean'
game 'gta5'

server_scripts {
  '@ragemp-fivem-bridge/server.js',
  'server/index.js'
}

client_scripts {
  '@ragemp-fivem-bridge/client.js',
  'client/index.js'
}

The @ragemp-fivem-bridge/... imports load the bridge before your gamemode scripts.

Copy your RAGE:MP gamemode files

Copy your built RAGE:MP gamemode files into resources/gamemode.

If your gamemode is written in TypeScript, build it first, then copy the compiled output.

If your gamemode is not written in TypeScript, rename the folders before copying them:

  • Rename packages to server.
  • Rename client_packages to client.

Your copied files should be placed here:

resources/gamemode/server
resources/gamemode/client

Configure NUI/CEF support

Inside resources/gamemode, create a ui folder.

Then create a host.html file inside resources/gamemode/ui:

host.html
<!doctype html>
<html>
  <body>
    <script src="https://cfx-nui-ragemp-fivem-bridge/ui/_bridge.js"></script>
  </body>
</html>

This file enables mp.browsers.new(...) to work through FiveM NUI.

Start the bridge and gamemode

Add both resources to your server.cfg:

server.cfg
ensure ragemp-fivem-bridge
ensure gamemode

Keep this order. The bridge must start before your gamemode.

Final folder structure

After completing the setup, your gamemode resource should look like this:

fxmanifest.lua

Next steps

You can now start your FiveM server and test your RAGE:MP gamemode through the bridge.

If the resource does not start correctly, check your server console for script loading errors and confirm that ragemp-fivem-bridge is started before gamemode.

On this page