Inventories metadata

Keys metadata for the different inventories

qb-inventory

Navigate to qb-core/shared/items.lua and add the following code:

['keys']                           = {['name'] = 'keys',                              ['label'] = 'Car Keys',                 ['weight'] = 500,         ['type'] = 'item',         ['image'] = 'keys.png',                 ['unique'] = true,     ['useable'] = true,     ['shouldClose'] = true,       ['combinable'] = nil,   ['description'] = 'Car Keys'},

Go to qb-inventory/apps.js and add:

} else if (itemData.name == "keys") {
    $(".item-info-description").html(
     "<p><strong>License Plate: </strong><span>" +
     itemData.info.plate +
    "</span></p><br /><p>" +
     itemData.description +
    "</p>"
);

Under:

} else {
    $(".item-info-description").html(
     "<p><strong>Serial Number: </strong><span>" +
    itemData.info.serie +
     "</span></p><p><strong>Munition: </strong><span>" +
    itemData.info.ammo +
     "</span></p><p>" +
    itemData.description +
       "</p>"
    );
}

ox_inventory

Navigate to ox_inventory/data/items.lua and add the following code:

['keys'] = {
    label = 'Car Keys',
    weight = 1,
    stack = false,
    close = false,
    description = "Car Keys",
    server = {
        export = 'okokGarage.lockvehicle',
    },
},

Last updated