Framework Adapters (bridge/framework/)

Framework adapters provide player state checks, character identification, job details, and cash/bank balance manipulation.


Supported Frameworks

  • Qbox (bridge/framework/qbox.lua): Native qbx_core player object and callbacks.
  • QBCore (bridge/framework/qb.lua): Standard QBCore.Functions.GetPlayer.
  • ESX Legacy (bridge/framework/esx.lua): ESX.GetPlayerFromId.
  • ox_core (bridge/framework/ox.lua): Ox.GetPlayer.
  • Standalone (bridge/framework/standalone.lua): Fallback for custom servers.

Adding a Custom Framework

To add your own custom framework:

  1. Create bridge/framework/custom.lua.

  2. Implement the standard methods:

    Lua
    Finals.Bridge.GetPlayerName = function(source) ... end
    Finals.Bridge.GetPlayerJob = function(source) ... end
    Finals.Bridge.GetMoney = function(source, moneyType) ... end
    Finals.Bridge.AddMoney = function(source, moneyType, amount) ... end
    Finals.Bridge.RemoveMoney = function(source, moneyType, amount) ... end
  3. Set Config.Bridge.Framework = 'custom' in configuration/config.lua.