Requirements#
- ox_lib
- ox_inventory
- Optional: glitch-lootBox. When it is running it opens the card packs, supplies real pull rates for the card backs and decides which rarities show as ??? until a player owns one. Without it the built-in pack opener takes over: it rolls from
Config.FallbackOdds, andConfig.HideRaritiesmasks the rarest cards. - Optional: qbx_core. Shown cards display the character name when it is running and the FiveM name otherwise.
Installation steps#
- Put
glitch-cardAlbumsin your resources folder. - Open
install/items.luaand copy the entries intoox_inventory/data/items.lua. - Add the card artwork (see Artwork).
- Add
ensure glitch-cardAlbumsto server.cfg afterox_inventory. - Restart the server so ox_inventory picks up the new items.
You can sell albums in a shop or hand out items with any inventory script. Keeping packs for sales and drops keeps the chase interesting.
Items#
| Item | What it is |
|---|---|
soccer_card_album, basketball_card_album |
The albums. They are not stackable, and trading an album trades its cards. Do not make them stackable. |
soccer_card_pack, basketball_card_pack |
Sealed packs, one card each. Opened by the built-in opener (the glitch-cardAlbums.openPack export, already set in install/items.lua) or by glitch-lootBox. The pack items must keep consume = 0: otherwise ox_inventory removes a pack before the export runs and the opener takes a second one. |
card_fb_*, card_bb_* |
The 24 cards. Using one opens it with an album picker. |
Albums and cards call the glitch-cardAlbums.use export through the item client.export field. The definitions in install/items.lua already have it.
Stuck on a step?Ask in the Discord →