Installation — Trading Cards | Quasar Store | Quasar Store
Documentation
Installation
Install Trading Cards on your FiveM server: requirements, server.cfg load order, the automatic database setup, the starter cards, inventory items for ox_inventory, qs-inventory and QBCore, and creator access.
Before installing Trading Cards, make sure your server meets the minimum requirements. Three things are mandatory — the database driver, ox_lib and an inventory with item metadata, because every card, pack and album is an item. Everything else is optional and detected on its own.
Requirement
Status
Notes
oxmysql
Required
Database access. The tables create themselves.
ox_lib
Required
Callbacks, notifications and the progress bar.
Inventory
Required
ox_inventory, qs-inventory, qb-inventory, core_inventory, origen_inventory, codem-inventory or tgiann-inventory. It must support item metadata.
tradingcards_props
Required
Ships in the download. The pack, album and card models held in hand.
Framework
Optional
es_extended, qb-core or qbx_core — auto-detected. With none, the standalone bridge takes over (with ox_inventory or qs-inventory).
Target
Optional
ox_target, qtarget or qb-target, only if you switch Config.UseTarget on. Otherwise NPCs use an [E] prompt.
qs-interface / qs-textui
Optional
Notifications and progress bar, and the 3D [E] prompt. ox_lib and a drawn label are used without them.
The resource picks the right bridge by looking at what is already running:
After purchasing Trading Cards, the resource is automatically linked to your CFX Portal account.
Sign in to the CFX Portal using the same account used during checkout, open Granted Assets, and download Trading Cards.
After extracting the download, you should have the following folders:
lua
tradingcards/
├── [img]/ -- inventory icons for the six items
├── [items]/ -- item definitions: ox_inventory, qs-inventory, qb-core
├── tradingcards_props/ -- the pack, album and card models (streamed)
└── qs-tradingcards/
├── shared/config.lua -- what you may edit
├── client/custom/ -- bridges to other resources (editable)
├── server/custom/ -- bridges to other resources (editable)
├── server/webhook.lua -- Discord logs
├── locales/ -- 41 languages
├── database/sql.sql -- optional starter cards
└── web/ -- the interface, already built
The loading order matters. Detection only sees resources that are already started: a framework that starts after Trading Cards is not found and the standalone bridge is used, and an inventory that starts after it stops the resource with No inventory found.
There is nothing you must import. On its first start Trading Cards creates its own tables and writes the starter rarities and booster packs:
Table
Holds
qs_tradingcards_cards
Every card: name, artwork, rarity, lore, stats, the pack it drops from, its theme and whether it is enabled.
qs_tradingcards_rarities
The rarities — colours, holographic and sparkle effects, drop weight and the inventory item each one is handed out as. Seeded with Basic, Rare and Legendary.
qs_tradingcards_boosters
The booster packs — item, label, artwork and cards per pack. Seeded with Booster Pack and Legends Pack, five cards each.
qs_tradingcards_themes
Card designs made in the theme editor.
qs_tradingcards_peds
The shop, grader and trader NPCs you place.
qs_tradingcard_stashes
The contents of every card album.
A brand-new server has rarities and packs but no cards yet. You have two ways to fill the catalogue:
qs-tradingcards/database/sql.sql adds 82 ready-made cards — 44 in the Booster Pack and 38 in the Legends Pack, across all three rarities, with artwork and lore — plus the three built-in themes. Import it with HeidiSQL or any MySQL/MariaDB client before or after the first start. Every insert skips rows that already exist, so it never overwrites your own data.
Skip the file and make every card in game with /cardcreator → Card Creator. Until there is at least one card, the console prints No cards found on start and packs refuse to open — see Usage.
core_inventory, origen_inventory, codem-inventory and tgiann-inventory each have their own item format. Register the same six names with the same rules: the three cards and the album unique / not stackable and usable, the two packs stackable and usable. The icons are in [img].
A rarity you create later in the creator is handed out as the item you name on it, so that item has to exist in your inventory too. The same goes for any extra booster pack.
Everything about the collection is edited in the creator, opened with /cardcreator. It is checked on the server, and any of these routes lets a player in:
Add the permission to a group or a single identifier in server.cfg, then restart the resource:
bash
add_ace group.admin command.cardcreator allow
# or for a single player
add_ace identifier.license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx command.cardcreator allow
Automatic. A player whose framework group is admin, superadmin or god is let in — the ESX group, or the QBCore/Qbox permission. Change the list in Config.CardCreator.adminGroups.
Without a framework there are no groups, so the same list is read from aces: a player in group.admin, group.superadmin or group.god is let in.
Almost nothing is configured in files. Cards, rarities, drop weights, themes, shops, graders and traders are all edited in game. shared/config.lua is for plumbing:
lua
Config.Language = GetConvar('qs:locale', 'es') -- or set `setr qs:locale "en"` in server.cfg
Config.Framework = ... -- auto-detected; 'esx', 'qb' or 'standalone' to force one
Config.Inventory = ... -- auto-detected; see Integrations
Config.UseTarget = false-- third eye on the NPCs instead of the [E] prompt
Config.EnableControlsWhenFocus = true-- the game keeps reading keys while an overlay is open
Config.OpeningTime = 2500-- pack opening progress bar, in ms
Config.ShowToPlayers = true-- "Show" displays the card to every player within 3 m
Config.ShowAnimation = true-- hold a physical card prop while showing it
Config.ShopItems = { -- stock for shop NPCs that have none of their own
{ name = 'tradingcard_booster_pack', price = 500 },
{ name = 'tradingcard_stash', price = 2500 },
}
Config.CardCreator = {
command = 'cardcreator',
permission = 'command.cardcreator',
adminGroups = { 'admin', 'superadmin', 'god' },
}
Config.Debug = true-- [DEBUG] lines in the console; set false in production
Config.VisualMode = false-- open packs without taking the pack or giving the cards (testing)
The two Seeded lines only appear on the very first start. 0 cards with a red No cards found line means the starter cards were not imported and none have been created yet.
Then join the server and work through the first loop:
Open a pack
Give yourself a tradingcard_booster_pack and use it. The progress bar runs with the pack in your hands, then slide the top tab to tear it open and flip the five cards.
Store a card
Give yourself a tradingcard_stash, use one of the cards you pulled and pick Store in Album. Use the album to see it on the first page.
Place a shop
Type /cardcreator. It opens on the Peds tab: create a Shop NPC, press Place in the world, aim, click, and save. Usage covers everything from there.
Nothing needs a restart from here on. Cards, rarities, themes and NPCs are saved to the database and pushed to every player as you save them.
Copy the PNGs from [img] to qs-inventory/html/images/.
Copy the PNGs from [img] to your inventory's image folder — qb-inventory/html/images/ for qb-inventory.