Installation

Requirements

Dependency
Required
Notes

oxmysql

Yes

Database driver

es_extended

No

Required only for ESX framework

qb-core or qbx_core

No

Required only for QBCore framework

ox_inventory

No

Optional β€” auto-detected

Setup

1

Place the koja-lib folder inside your resources directory

resources/
  [dev]/
    koja-lib/
2

Add to your server.cfg before any script that depends on it

ensure koja-lib

koja-lib must start before any resource that uses it.

3

Open editable/shared/config.lua and configure the options for your server

See Configuration.

Accessing the API

local KOJA = exports['koja-lib']:getSharedObject()

-- or via event
TriggerEvent('koja:getSharedObject', function(obj)
    KOJA = obj
end)

The shared object exposes KOJA.Client on the client and KOJA.Server on the server, along with KOJA.Framework, KOJA.Inventory, and KOJA.Misc.

File Structure

Only files inside editable/ are intended to be modified.

Last updated