Studios
Card Albumshouse-3.jpg

Installation

SoonCard AlbumsQBCore · Qbox · ESX
PAGE 02 OF 06  ·  OVERVIEW → INSTALLATION → CONFIGURATIONdocs.glitchstudios.dev
Browse docs

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, and Config.HideRarities masks the rarest cards.
  • Optional: qbx_core. Shown cards display the character name when it is running and the FiveM name otherwise.

Installation steps#

  1. Put glitch-cardAlbums in your resources folder.
  2. Open install/items.lua and copy the entries into ox_inventory/data/items.lua.
  3. Add the card artwork (see Artwork).
  4. Add ensure glitch-cardAlbums to server.cfg after ox_inventory.
  5. 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.