QB Inventory

Kartik-Business integrates with qb-inventory, allowing business items (food, ingredients, products, etc.) to be dynamically registered at runtime.

Unlike other integrations, for qb-inventory, the core logic has been centralized in qb-core to ensure system-wide compatibility.


πŸ“¦ Requirements

Before proceeding, ensure the following dependencies are installed and running:

  • qb-inventory

  • qb-core

  • oxmysql

  • Kartik-Business

  • kartik-laptop


πŸ”— How the Integration Works

When Kartik-Business needs to register a new item:

  • It triggers a server event that is handled by qb-core.

  • qb-core appends the item to qb-core/shared/items.lua for persistence.

  • qb-core updates the internal QBCore.Shared.Items table for instant availability.

  • If an image URL is provided, it is downloaded and saved to qb-inventory/html/images/.

This process ensures that items created through the business system are recognized by all QBCore scripts immediately.


πŸ“Œ Server Event: Insert Item

Kartik-Business uses the following event to register items:

Item Data Format


πŸ› οΈ Required QB Inventory Modification

To allow dynamic item registration, you can add the integration logic to your inventory script.

πŸ“ File to Edit

πŸ“Œ Implementation

Add the following event handler to the end of the file. This version appends the item to qb-core and downloads the image to the inventory's UI folder.


⚠️ Important Notes

  • Persistence: Items are written to the physical items.lua file.

  • Instant Use: No server restart or resource restart is required.

  • Image Location: Images are saved automatically to:

  • Uniqueness: If an item with the same name already exists in QBCore.Shared.Items, the insertion is skipped.


βœ… Integration Complete

With this setup, Kartik-Business and qb-inventory are fully synced. New items created via the business app will be immediately available in the inventory and across the entire server.

Last updated