Studios
Loot Boxhouse-3.jpg

Installation

FreeLoot BoxQBCore · Qbox · ESX
PAGE 02 OF 07  ·  OVERVIEW → INSTALLATION → CONFIGURATIONdocs.glitchstudios.dev
Browse docs

Requirements#

Framework qbx_core, qb-core or es_extended. Used to make crates usable items.
Resources ox_inventory and ox_lib. Both are listed as dependencies in the manifest.
Server FiveM server with OneSync and Lua 5.4 (lua54 'yes'). Tested with qbx_core 1.24.0 and ox_inventory 2.48.0.
Database None. Pending loot is kept in the resource KVP store.
Optional glitch-crafting for blueprint and unlock rewards, glitch-abstraction as an inventory and usable-item fallback, glitch-criminaltablet for the pawn check, glitch-cardAlbums to read pack odds. All are detected at run time.

Installation steps#

  1. Put the folder in your resources directory. The folder name must be exactly glitch-lootBox. It is case-sensitive.

  2. Open install/items.lua and paste the entries you need into ox_inventory/data/items.lua (drop the return { and the closing }). Restart ox_inventory. The default pack needs cache_alley, cache_street and cache_deposit. Do not give a crate a client.export or server.export, because crates are used through your framework.

  3. Open config/crates.lua. It ships three crates that only hand out stock ox_inventory items (water, burger, bandage, lockpick, radio, armour, phone and cash). Edit or replace them.

  4. Add the resource to server.cfg, after your framework and ox_inventory:

    ensure ox_lib
    ensure qbx_core
    ensure ox_inventory
    ensure glitch-lootBox
    
  5. Restart the server and check the console. The resource prints one warning for every crate item or reward item that ox_inventory does not know.

There is no SQL to import and no permission to grant. The resource has no commands.

Item images#

Item images come from ox_inventory (the inventory:imagepath convar, or nui://ox_inventory/web/images/). If your crate or reward images are blank, see Troubleshooting.

The demo pack#

config/crates.demo.lua holds the larger set the Glitch Studios demo server runs: munitions crates, vault caches, blueprint cases, card packs, a blind box and a sneaker box. Their rewards use items from that server, so load the pack only after your inventory has them. Set config.server.cratePack = 'demo' to load it, or copy single crates into config/crates.lua.

Updating#

Back up config/ before replacing files. Replace everything else, merge any new keys into your config files, restart ox_inventory if you changed items, then restart glitch-lootBox. Pending loot sits in KVP and is not touched by an update.