Commands#
None. Crates are opened by using the crate item. On the crate screen, SPACE or ENTER unlocks on the preview and opens another on the reveal, ESC or BACKSPACE closes, and SPACE, ENTER or ESC skips the reel.
Client exports#
None.
Server exports#
| Export signature | Returns |
|---|---|
exports['glitch-lootBox']:GetDropRates() |
A table of item name to best pull chance in percent. An item in several crates reports its best chance. |
exports['glitch-lootBox']:GetMysteryItems() |
A list of item names that sit behind a mystery grade in any crate. |
glitch-cardAlbums reads both to show pack odds.
Events and callbacks#
There are no callbacks and no events meant for other resources. The glitch-lootBox:server:* and glitch-lootBox:client:* events are the resource's internal session protocol. To start a crate, give the player the crate item and let them use it.
Integration notes#
- Crates are registered as usable items through qbx_core, then qb-core, then es_extended, with
glitch-abstractionas the last fallback. - A heist or job script can hand out crates with item metadata
source = '<jobId>'. See Adding Crates.
Stuck on a step?Ask in the Discord →