Overview

koja-lib abstracts the differences between ESX and QBCore so your scripts work on both without any changes.


Supported Frameworks

Framework
Resource Name
Config value

ESX

es_extended

"esx"

QBCore

qb-core

"qb"

QBX Core

qbx_core

"qb"

Custom

"custom"

QBCore and QBX Core both map to the "qb" internal identifier. koja-lib resolves the correct core object automatically.


Detection Order

When Config.Framework = "auto", koja-lib checks resources in this order:

  1. es_extended

  2. qbx_core

  3. qb-core

The first one found in started state is used. If none are running, the framework is set to "custom".


Runtime Value

The resolved framework is available at runtime:


Forcing a Framework

Set Config.Framework to skip auto-detection:


How the Bridge Works

Every public koja-lib function is framework-agnostic. Internally, koja-lib maps each call to the correct native API:

You never need to check KOJA.Framework in your scripts unless you are doing something framework-specific.

Last updated