Overview

What Obsi Lib is, why to use it and which resources it supports.

Obsi Lib (obsi-lib) is the shared library behind every Obsi Scripts resource. It puts the framework, inventory, banking, target, clothing, vehicle keys and fuel behind one API, and adds notifications, a progress bar, a text UI and 3D sounds in the Obsi look.

Obsi Lib

One API for every server

Write a script once and it runs on ESX, QBCore and QBX, with whatever inventory the server uses:

server.lua
if ObsiLib.job.is(source, 'police')
   and ObsiLib.items.has(source, 'handcuffs') then
    ObsiLib.money.add(source, 500, 'bank', 'arrest bonus')
    ObsiLib.notify(source, {
        title = 'Bonus',
        description = 'You received **$500**.',
        type = 'success',
    })
end
client.lua
local done = ObsiLib.ui.progress({
    label = 'Picking the lock',
    duration = 5000,
    anim = { dict = 'mp_arresting', clip = 'a_uncuff' },
    cancelable = true,
})
if done then
    ObsiLib.sound.playAt(GetEntityCoords(PlayerPedId()), 'unlock', { range = 8.0 })
    ObsiLib.ui.showText({ key = 'E', label = 'Open door' })
end

Obsi Lib UI

Built-in UI: text UI, progress bar and notifications in the Obsi look

Why use it

Zero setup

Framework, inventory, banking, target, clothing, keys and fuel are detected on start. Force or disable any of them in the config.

Safe by default

Item and money writes check balances first. Stash moves are validated and rolled back on the server.

Cleans up after you

Callbacks, usable items, points, target zones, keybinds, DUIs and state listeners are removed when your resource stops.

Patch, don't fork

Replace one framework or inventory function from editable/ without touching the library.

UI included

Notifications, progress bar and text UI with an accent colour you choose.

3D sounds

NUI sound engine with live distance falloff, or xsound when it is running.

Supported resources

Features

AreaSupported
FrameworksESX Legacy, QBCore, QBX, custom
Inventoriesox_inventory, qb-inventory (v2 and v1), ps-inventory, lj-inventory, codem-inventory, jaksam_inventory, custom, framework items
Banking (society)Renewed-Banking, okokBanking, qb-banking, qb-management, esx_society
Targetox_target, qb-target
Clothingillenium-appearance, fivem-appearance, qb-clothing, esx_skin / skinchanger
Vehicle keysqbx_vehiclekeys, qb-vehiclekeys, wasabi_carlock, mk_vehiclekeys
Fuelox_fuel, LegacyFuel, cdn-fuel, ps-fuel, lc_fuel, native
Notificationsbuilt-in, ESX, QBCore, ox_lib, custom
Soundsbuilt-in NUI player (live distance falloff), xsound

Everything is detected automatically, and every integration can be forced or turned off in the configuration.