API Reference
The IsCatalogOpen client export and how oxide-dealerships integrates with other resources through o-link.
oxide-dealerships is a finished, self-contained system: a server owner installs it, sets up dealerships in-game, and players use them. Nothing else needs to call into it to make it work. It exposes one small export for scripts that want to react to the catalog being open.
Client Exports
IsCatalogOpen()
Returns true while the player has the vehicle browsing catalog open (the screen that appears when they talk to a dealership greeter), and false otherwise.
local isOpen = exports['oxide-dealerships']:IsCatalogOpen()The most common use is hiding your HUD while a player is browsing, so it doesn't sit on top of the catalog. For example, in your HUD resource's client code:
CreateThread(function()
while true do
Wait(500)
local browsing = GetResourceState('oxide-dealerships') == 'started'
and exports['oxide-dealerships']:IsCatalogOpen()
-- call your HUD's own show/hide function here
SetHudVisible(not browsing)
end
end)The GetResourceState check makes sure your HUD doesn't error if oxide-dealerships is ever stopped or removed.
How It Talks to Other Resources
All of the cross-resource behavior you'd expect — charging money, registering vehicles to characters, transferring ownership, sending phone emails, checking jobs, and optional banking — flows through o-link, the framework bridge. That's what lets the same resource run on QBCore, ESX, and QBX without any per-framework glue:
| Concern | Bridge |
|---|---|
| Money (cash, bank) | o-link's money bridge |
| Vehicles (registering, ownership transfers, plates) | o-link's vehicle bridges |
| Characters and jobs (identity, job restrictions) | o-link's character and job bridges |
| Notifications, menus, and targeting | o-link's UI bridges |
| Phone emails | o-link's phone bridge (optional; skipped if no phone resource is installed) |
| Credit-score financing and invoices | o-link's banking bridge (optional; requires oxide-banking and Config.Finance.useOxideBanking) |
Because the resource consumes these through o-link rather than calling any framework directly, supporting a new framework is a matter of o-link adding an adapter — not of oxide-dealerships changing.
Need an Integration?
If you have a specific integration in mind — for example, an export to read a player's finance contracts, or an event your resource could listen for — contact Oxide Studios with your use case and we'll consider adding a supported API in a future version.