Skip to main content
If you’re using supported inventory you dont have to make any changes in this section.
You can override inventory actions from no-base/configure/server/inventory.lua

Examples


This is an example of how we handle qb-inventory. Since we support qb-inventory internally you don’t need to make any changes if you use qb-inventory.
Registers item to the inventory.

Parameters

  • itemName: string
  • cb: Function(source: number, item: {metadata: any})
Adds item to the given source’s inventory.

Parameters

  • source: number
  • itemName: string
  • count: number
  • metadata?: any

Returns

  • success: boolean
Removes item to the given source’s inventory.

Parameters

  • source: number
  • itemName: string
  • count: number

Returns

  • success: boolean