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.
Requirements
Section titled “Requirements”Required by the manifest
Section titled “Required by the manifest”- FiveM server artifact 7290 or newer
- OneSync enabled
Required for framework features
Section titled “Required for framework features”Start exactly one supported framework before lx-lib:
- Qbox installation —
qbx_core - QB-Core installation guides —
qb-core - ESX Legacy core documentation —
es_extended
Without a supported framework, lx-lib can start but player, money, job, and framework notification features cannot operate.
Optional
Section titled “Optional”ox_inventoryinstallation/download (recommended, including on ESX) orqb-inventorydocumentationox_libinstallation/download for styled notifications
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.
Install
Section titled “Install”- Download
lx-libfrom your Cfx.re account. - Place it in your resources folder without renaming it:
resources/ [lx]/ lx-lib/- Add the appropriate start order to
server.cfg:
ensure qbx_core # or qb-core / es_extendedensure ox_inventory # optional; or qb-inventoryensure ox_lib # optional notification rendererensure lx-libOnly enable the framework and inventory actually used by your server.
Detection and restart behavior
Section titled “Detection and restart behavior”lx-lib detects framework and inventory once when it starts. Only resources already in the started state are considered.
Detection priority:
- Framework: Qbox → QB-Core → ESX
- 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.
Add lx-lib to another resource
Section titled “Add lx-lib to another resource”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.
Verify the installation
Section titled “Verify the installation”- Server console reports the expected framework and inventory
- No missing-adapter or resource-start errors appear
GetFramework()returnsqbx,qb, oresx- Restarting a consumer after lx-lib produces no
@lx-lib/init.luaerror
Set Config.Debug = true in lx-lib/shared/config.lua only when you need additional adapter-load traces.