Koja Scripts

Installation

Set up koja-inventory-v2: dependencies, server.cfg order, the ox_inventory bridge, admin access, item images and a first-run checklist.

Installation

  1. Install the dependencies

    These must be started before the inventory:
    • oxmysql
    • your framework (es_extended or qb-core)
    • koja-lib
    The manifest declares oxmysql and koja-lib as dependencies, so the resource will not start without them.
  2. Stop your old inventory

    Only one inventory can run. Remove ensure ox_inventory (or qb-inventory, qs-inventory and so on) from server.cfg. If you come from ox_inventory, keep its data/ folder: it is imported automatically. See Migrating from ox_inventory.
  3. Add the resource

    Put the koja-inventory-v2 folder in your resources directory. The folder name is the resource name and the name used by exports, so do not rename it.
  4. Edit server.cfg

    server.cfg
    ensure oxmysql
    ensure es_extended   # or qb-core
    ensure koja-lib
    ensure koja-inventory-v2
    ensure ox_inventory  # only the bridge, see below
  5. Give admins access

    Admin commands and the /invadmin panel are allowed for the ACE command.koja-inventory-v2 and for the framework groups in Config.AdminGroups (admin, superadmin, god by default).
    server.cfg
    add_ace group.admin command.koja-inventory-v2 allow
  6. Database

    Nothing to import. On start the resource creates one table, koja_inventory_v2, that holds every inventory (players, slots, backpacks, stashes, trunks, gloveboxes). If you used the older koja_grid_inventory build, its table is renamed to koja_inventory_v2 automatically on the first start. See Database.
  7. Item images

    Images are read from Config.ImagePath (default images/, which is web/build/images/<item>.png). The release already contains images for the default items. You can point the path at another resource, for example nui://ox_inventory/web/images/. Items without an image show a category icon.
  8. Start and check the console

    On start the console prints a banner with the version, framework, koja-lib version, database status, item count (and how many came from ox), shops, stashes, benches, admin locations, enabled features and detected integrations (ox compatibility, target, appearance). If a line says off for something you use, check that the resource is started before the inventory.

First-run checklist

  • The banner shows Database connected and no red errors.
  • The item count includes your ox items (Items ... (ox N)).
  • Join and press TAB. The inventory opens and your old items are there.
  • Type /invkit as an admin. You get the showcase kit.
  • Open a trunk, drop an item, open a shop and craft something at a bench.
  • Open /invadmin and check the Locations tab lists your shops, stashes and benches.
  • Set Config.Locale to your server language. See Translations.