Browse docs

CodeM Inventory V2

Configure CodeM Supreme Inventory V2 with Sky Base and install its item definitions.

Sky Base has a separate codemv2 adapter for codem-inventoryv2 on ESX, QBCore and Qbox. The older codem adapter remains for codem-inventory.

Start order and selection

Install CodeM's resources using its installation guide. Start your framework and database connector first, followed by:

ensure codem-lib
ensure codem-inventory-images
ensure codem-inventoryv2
ensure sky_base
ensure sky_jobs_base
# Your Sky job resources follow.

Do not run ox_inventory alongside V2: CodeM provides that compatibility name itself. In sky_base/config/config.lua, leave inventory = "auto" or select inventory = "codemv2". Auto detection checks the real V2 resource before the Ox compatibility name. This is a startup setting; restart Sky resources after changing it.

Items and images

Select codem-inventoryv2 on each resource's Inventory Items page or in the setup generator. Paste the entries inside the returned table in codem-inventoryv2/data/items.lua, then restart the inventory and the Sky resources in their normal start order so usable items are registered again. Keep configured Sky item names aligned with those entries.

The V2 templates use CodeM's documented Ox-format definitions with consume = 0 and no client block. Sky resources register the use callbacks and remove consumed items at the appropriate point in their own actions. CodeM otherwise defaults to consuming one item, and its CreateUsableItem callback is documented for items with no client block. See item definitions and server exports.

Copy supplied images to codem-inventory-images/images/, using the item name as the filename. For Fire Job's hydrualic_spreader, copy the supplied hydraulic_spreader.png as hydrualic_spreader.png. CodeM's picture documentation describes its separate image resource and optional custom paths. Sky Base's item-info image URL uses that default resource; if you use custom image hosting, configure the matching Jobs Base NUI image sources.

Fire hose

Add WEAPON_SKY_HOSE to the existing Config.ignoreWeapons list in codem-inventoryv2/shared/config.lua, preserving its other entries. CodeM documents this list as the weapons excluded from its weapon-mismatch check; see weapon settings.

Supported operations and limits

The adapter uses V2's documented exports for item and weapon operations, capacity checks, slot metadata, usable items, stashes, shops, player inventory access and vehicle storage. Item changes emit Sky's existing inventory-update notification.

  • Runtime creation or reload of item definitions has no documented V2 export. Missing definitions must be added to data/items.lua, followed by a restart.
  • CodeM's ClearInventory preserves money accounts. Clearing a stash follows that documented behavior; Sky only reports a completely empty stash after readback.
  • Vehicle reads use the documented trunk<plate> and glovebox<plate> IDs. An unavailable inventory remains unavailable; it is never reported as an empty one. CodeM does not document a network-ID-based read resolver or whether these reads normalize a plate according to Config.trimPlate or load unopened vehicle storage.
  • Custom image-resource settings are not exposed by a documented getter; the adapter uses codem-inventory-images for item-info image URLs.

These mappings are based on CodeM's published V2 documentation. In-game checks with an installed V2 resource on ESX and QBCore/Qbox remain required.