Inventory Items

This section includes the complete item list for the script, ready to be integrated into the most popular inventory systems. Each item is properly configured with its name, label, and parameters to ensure full compatibility and seamless functionality within your server’s inventory setup.


qs-inventory
['book'] = {
    ['name'] = 'book',
    ['label'] = 'Book',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'book.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'An empty book that can store images as pages.'
},

To display the item's metadata in the description, you must add this to config/metadata.js:

if (itemData.name == "book" && itemData.info.title) {
    const info = itemData.info || {};
    const title = info.title || label || 'Book';
    let pagesArr = [];
    try { pagesArr = JSON.parse(info.pages || '[]'); } catch (_) { pagesArr = Array.isArray(info.pages) ? info.pages : []; }
    const pagesCount = Array.isArray(pagesArr) ? pagesArr.length : 0;
    const author = info.author || 'Unknown';

    $(".item-info-title").html(`<p>${title}</p>`);

    const rows = [
        `<p><strong>Title: </strong><span>${title}</span></p>`,
        `<p><strong>Author: </strong><span>${author}</span></p>`,
        `<p><strong>Pages: </strong><span>${pagesCount}</span></p>`
    ];
    $(".item-info-description").html(rows.join(''));
}
qb-inventory
['book'] = { ['name'] = 'book', ['label'] = 'Book', ['weight'] = 100, ['type'] = 'item', ['image'] = 'book.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'An empty book that can store images as pages.' },
ox_inventory
['book'] = {
        label = 'Book',
        weight = 100,
        stack = false,
        consume = 0,
        server = {
            export = 'qs-books-creator.openBook',
        },
},