AK47 QB Inventory

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

This custom QB inventory script has built-in support for Kartik-Business item registration, ensuring items are automatically added to the shared items table without additional modifications.


πŸ“¦ Requirements

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

  • ak47_qb_inventory

  • qb-core

  • oxmysql

  • Kartik-Business

  • kartik-laptop


πŸ”— How the Integration Works

When Kartik-Business needs to register a new item:

  • It triggers the server event handled by ak47_qb_inventory.

  • The item is appended to ak47_qb_inventory/shared/items.lua for persistence.

  • The internal Config.Shared.Items table is updated for instant availability.

  • If an image URL is provided, it is downloaded and saved to ak47_qb_inventory/web/images/.

This process ensures that items created through the business system are recognized immediately.


πŸ“Œ Server Event: Insert Item

Kartik-Business uses the following event to register items:

Item Data Format


πŸ› οΈ Built-in Integration

ak47_qb_inventory comes with pre-built support for Kartik-Business. The integration logic is already included in the script.

πŸ“ Files Involved

  • ak47_qb_inventory/bridge/qb/server.lua - Contains the event handler

  • ak47_qb_inventory/shared/items.lua - Where items are stored

πŸ“Œ Implementation

The event handler is already present in bridge/qb/server.lua:


⚠️ Important Notes

  • Persistence: Items are written to the physical shared/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 Config.Shared.Items, the insertion is skipped.


βœ… Integration Complete

With ak47_qb_inventory, Kartik-Business integration is ready out-of-the-box. New items created via the business app will be immediately available in the inventory and across the entire server.

Last updated