Introduction
What This Project Does
ragemp-fivem-bridge lets you run a JavaScript RAGE:MP gamemode on FiveM with minimal rewrites.
Your scripts keep using the familiar mp.* API. The bridge maps that API to FiveM natives, net events, state bags, and NUI callbacks.
Who This Documentation Is For
- Developers porting an existing RAGE:MP JavaScript gamemode.
- Teams building new gameplay with RAGE:MP-style APIs on top of FiveM.
Start Here
- Read Getting Started to choose your mode.
- Follow either standalone.
- Read Server and Client sections.
- If you use UI, read NUI / CEF.
- Before production, read Configuration and Troubleshooting.
Core Concepts
mpis installed globally by the bridge at runtime.- The bridge is split into server, client, and CEF runtimes.
- Standalone resource (
@ragemp-fivem-bridge/server.js,@ragemp-fivem-bridge/client.js)
Important Production Notes
mp.game.wait() blocks the client in render on FiveM.
Treat client-side events and arguments as untrusted input.
Remote `eval` and raw native `invoke` are disabled by default. Enable them only if you fully understand the risk.
If you use `mp.gui.takeScreenshot`, you must run the `screenshot-basic` resource.
Think something is wrong in the docs? Open an issue here.