DirkScripts Logo

Login With FiveM

Login

Client

lib.inventory.getItems

Get all items in the player's inventory.

lua
local items = lib.inventory.getItems()

lib.inventory.hasItem

Check if the player has a specific item.

lua
local has = lib.inventory.hasItem(itemName, count, metadata, slot)
ParameterTypeRequiredDescription
itemNamestringyesItem name
countnumbernoMinimum required count (default 1)
metadatatablenoRequired metadata match
slotnumbernoSpecific slot to check

lib.inventory.getItemLabel

Get the display label for an item.

lua
local label = lib.inventory.getItemLabel(item)
ParameterTypeRequiredDescription
itemstringyesItem name

lib.inventory.items

Get all registered item definitions.

lua
local allItems = lib.inventory.items()

lib.inventory.displayMetadata

Register custom metadata labels to display in the inventory UI.

lua
lib.inventory.displayMetadata('serial', 'Serial Number')
-- or
lib.inventory.displayMetadata({ serial = 'Serial Number', quality = 'Quality' })
ParameterTypeRequiredDescription
labelsstring | tableyesMetadata key or key-value table
valuestringnoLabel (when first param is a string)

lib.inventory.openStash

Open a stash inventory.

lua
lib.inventory.openStash(id, data)
ParameterTypeRequiredDescription
idstringyesStash identifier
datatablenoStash options

Copyright Β© 2026 DirkScripts.

Not affiliated with or endorsed by Rockstar North, Take-Two Interactive, or any other rights holders. FiveM is a copyright and registered trademark of Take-Two Interactive Software, Inc.
Our checkout system is provided by Tebex Limited, who manage payment processing, product delivery, and billing support. Prices shown in currencies other than GBP are approximate conversions updated daily. All purchases are processed in GBP, so the final amount charged may vary depending on your bank or payment provider’s exchange rate.