dd-cards · Reference
Exports
The two client exports dd-cards publishes, both of them item-use handlers wired up through ox_inventory.
dd-cards publishes two client exports. Both exist so ox_inventory can call something when a player uses an item — they are not a general-purpose API.
useCardBox
exports['dd-cards']:useCardBox()
Opens a business_card_box and takes one card out of it, decrementing the count stored in the
item's metadata. When the last card is removed the box is used up.
Wired up in ox_inventory/data/items.lua:
['business_card_box'] = {
label = 'Business Card Box',
weight = 400,
stack = false,
consume = 0,
client = {
image = 'business_card_box.png',
export = 'dd-cards.useCardBox'
}
},
useCard
exports['dd-cards']:useCard()
Opens the card viewer for a business_card, showing the design the card was printed from.
['business_card'] = {
label = 'Business Card',
weight = 5,
stack = false,
consume = 0,
client = {
image = 'business_card.png',
export = 'dd-cards.useCard'
}
},
On qb-inventory
qb-inventory does not use exports for item behaviour — it calls back into the resource that
registered the item as useable. That registration is handled inside dd-cards, so on qb-inventory
there is nothing to wire up beyond setting useable = true in qb-core/shared/items.lua. See
Items & images.
What is not published
Note
dd-cards is escrow protected, and its gameplay code under modules/ is encrypted. Beyond the two
exports above, there is no published event or export API — no documented net events, no
callbacks, and no server-side exports for creating orders or granting cards programmatically.
If you need an integration point that does not exist, the practical route is a custom bridge — those files are outside escrow and run inside the resource, so they can see what an external script cannot.