The NOVA Bridge (nova_bridge) provides compatibility with existing ESX, QBCore, vRPex, and Creative scripts.
What Does the Bridge Do?
The bridge intercepts calls to other framework APIs and translates them to NOVA's native API. This means you can use most existing scripts without modification.
-- These ESX calls will work automatically:
local ESX = exports['es_extended']:getSharedObject()
-- Player functions
local xPlayer = ESX.GetPlayerFromId(source)
xPlayer.getMoney()
xPlayer.getJob()
xPlayer.addMoney(amount)
xPlayer.removeMoney(amount)
xPlayer.addInventoryItem(item, count)
xPlayer.removeInventoryItem(item, count)
-- Events
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
-- These QBCore calls will work automatically:
local QBCore = exports['qb-core']:GetCoreObject()
local Player = QBCore.Functions.GetPlayer(source)
Player.PlayerData.money.cash
Player.PlayerData.job
Player.Functions.AddMoney('cash', amount)
Player.Functions.RemoveMoney('cash', amount)
-- vRPex calls will be translated
local vRP = {}
Citizen.CreateThread(function()
vRP = exports['vrp']:getInterface()
end)
vRP.getUserId({source})
vRP.getMoney({user_id})
vRP.giveMoney({user_id, amount})
-- Creative framework calls will be translated
local API = exports['creative_api']
API:GetPlayerMoney(source)
API:AddPlayerMoney(source, amount)