Skip to content

lx-lib Installation

Install lx-lib on its own when another LX product or your own resource uses the shared LX.* API. Advanced Bus Job buyers should follow the product installation guide instead.

Start exactly one supported framework before lx-lib:

Without a supported framework, lx-lib can start but player, money, job, and framework notification features cannot operate.

Inventory is not a hard dependency. With no supported inventory, item APIs return safe false / 0 values. Without ox_lib, notifications use the available framework/native fallback.

  1. Download lx-lib from your Cfx.re account.
  2. Place it in your resources folder without renaming it:
resources/
[lx]/
lx-lib/
  1. Add the appropriate start order to server.cfg:
ensure qbx_core # or qb-core / es_extended
ensure ox_inventory # optional; or qb-inventory
ensure ox_lib # optional notification renderer
ensure lx-lib

Only enable the framework and inventory actually used by your server.

lx-lib detects framework and inventory once when it starts. Only resources already in the started state are considered.

Detection priority:

  1. Framework: Qbox → QB-Core → ESX
  2. Inventory: ox_inventory → qb-inventory

If you install, start, or swap an adapter after lx-lib is already running, restart lx-lib and every resource that consumes it.

In the consumer’s fxmanifest.lua:

shared_script '@lx-lib/init.lua'
dependency 'lx-lib'

Then use the shared API from client or server Lua:

local framework = LX.GetFramework()

See the lx-lib API overview, client exports, and server exports.

  • Server console reports the expected framework and inventory
  • No missing-adapter or resource-start errors appear
  • GetFramework() returns qbx, qb, or esx
  • Restarting a consumer after lx-lib produces no @lx-lib/init.lua error

Set Config.Debug = true in lx-lib/shared/config.lua only when you need additional adapter-load traces.