🧩 Creating a Custom Framework Bridge
Dream Bridge supports ESX, QBCore, and QBX out of the box. If you're using a different or modified framework, you can implement your own custom bridge to ensure compatibility.
This guide walks you through creating a new bridge using the built-in custom
template provided.
💡 Note: QBX (Qbox) is fully compatible with the QBCore bridge. No separate implementation needed.
📁 Bridge Structure
All bridges are located in the bridge/
folder.
Each framework (e.g., esx
, qbcore
, custom
) has its own subfolder with:
client.lua
server.lua

The bridge automatically detects your active framework via GetResourceState
.
Important: If your framework resource is renamed (e.g.,
es_extended
→roleplay_framework
), auto-detection may fail.
🚀 How to Use the custom Bridge
Use the custom
bridge:
- You're using a standalone or unofficial/unsupported framework
➡️ Create a new bridge based on thecustom
template. - You need to edit/change something in an existing bridge.
➡️ Try to edit the existing bridge first. e.g. Your owned_vehicles table is different from the default one. In this case you just need to edit the vehicle related functions in the existing bridge. No need to create a new one or edit all. - No supported framework is detected by default.
➡️ If you've renamed your framework resource, it may not be detected automatically (e.g.es_extended
->roleplay_framework
). In this case, you need toGetResourceState
to your renamed resource in the correct bridge file.
🛠️ Getting Started
- Copy the
bridge/custom
folder
Rename it to match your custom framework name (e.g.,bridge/myframework
). - Modify both
client.lua
andserver.lua
Implement your logic in the provided function stubs. - Adjust the framework detection logic
Replace or extend theGetResourceState
checks to detect your custom framework.
✅ Example: client.lua
if GetResourceState('my_framework') ~= 'started' then return end
DreamFramework.ServerFramework = 'myframework'
DreamFramework.ServerFrameworkLoaded = true
function DreamFramework.showHelpNotification(text)
-- Your custom help display code
end
function DreamFramework.getPlayerJobName()
return exports['my_framework']:GetJobName()
end
✅ Example: server.lua
if GetResourceState('my_framework') ~= 'started' then return end
DreamFramework.ServerFramework = 'myframework'
DreamFramework.ServerFrameworkLoaded = true
function DreamFramework.getPlayerFromId(source)
return exports['my_framework']:GetPlayer(source)
end
function DreamFramework.getPlayerMoney(source, account)
local player = DreamFramework.getPlayerFromId(source)
return player.money or 0
end
🧠 What Functions to Implement?
Your bridge must implement all functions included in the custom template and all other bridges. This includes:
- Player functions (e.g.,
getPlayerFromId
,getPlayerName
) - Job management
- Inventory & money
- Vehicle ownership
- Events like
OnPlayerLoaded
,OnPlayerJobChange
- Any other functions that the bridge has...
Check the
bridge/custom/client.lua
andbridge/custom/server.lua
files for the full list of required functions.
Every single function in the bridge template must be implemented in your custom bridge.
If even one function is missing, your framework will likely throw multiple errors, break scripts relying on those functions, and cause unexpected behavior.
➡️ Double-check bridge/myframework/client.lua
and bridge/myframework/server.lua
to ensure full function coverage.
Missing functions = broken experience.
⏰ Event Handling
Some events must be triggered manually for compatibility:
RegisterNetEvent('myfw:playerLoaded', function(playerId)
OnPlayerLoaded(playerId)
end)
RegisterNetEvent('myfw:jobChanged', function(playerId, newJob)
OnPlayerJobChange(playerId, newJob.name)
end)
💬 Tips
- Use logs like
print("[Bridge] Loaded custom bridge")
for easier debugging. - Test each function individually in a controlled environment.
- Make use of the
custom
folder as a base — it's already pre-filled with all required stubs.
🙌 Contribute Your Bridge
Made a working bridge for your own framework?
Feel free to share it with us — help others benefit from your integration!
🧠 Your contribution can become part of the official project, and you'll get full credit for your work.
💡 If you have any questions or need help, feel free to reach out to us on our Discord server.
Happy coding! 🚀