Snippets
Item Snippets
Here are item snippets to add to your items/framework.
['boosterpack'] = {
label = 'Booster Pack',
weight = 2,
consume = 1,
metadata = {},
client = {export = 't3_tradingcards.boosterpack'},
stack = true,
close = true,
description = ''
},
['album'] = {
label = 'Album',
weight = 2,
consume = 0,
metadata = {},
client = {export = 't3_tradingcards.album'},
stack = true,
close = true,
description = ''
},
['tradingcard'] = {
label = 'Trading Card',
weight = 2,
consume = 0,
metadata = {},
client = {export = 't3_tradingcards.useCard'},
buttons = {{label='Add to album',action=function(slot) TriggerServerEvent('t3_tradingcards:passCard',slot) end}},
stack = true,
close = true,
description = ''
},
Shop Snippets
Here are some snippets to add items to your shops.
{ name = 'boosterpack', price = 10, metadata = { pack = 'gta', image = 'gtaboosterpack' } },
{ name = 'album', price = 100, metadata = { pack = 'gta', image = 'gtaalbum' } },
{ name = 'boosterpack', price = 10, metadata = { pack = 'pokemon', image = 'pokemonboosterpack' } },
{ name = 'album', price = 100, metadata = { pack = 'pokemon', image = 'pokemonalbum' } },
Exports
If you enable the Config.Selling.useExport option, this will disable npc/marker selling, allowing you to control who can do this or or how they do it. Here's an example of how to do that for ox_target:
exports['ox_target']:addBoxZone({
coords = vec3(442.5363, -1017.666, 28.85637),
size = vec3(3, 3, 3),
options = {
{
name = 'sellAlbums',
groups = 'comic',
icon = 'fa-solid fa-book-open',
label = 'Open Sell Menu',
onSelect = function()
exports['t3_tradingcards']:openSellMenu()
end
}
}
})
Last updated