okokDocs
  • About Us
  • Scripts
    • okokVehicleControl
      • Config file
    • okokMechanicJob
      • Config file
    • okokPoliceJob
      • Config file
      • qb-inventory support
    • okokBossMenu
      • Config file
    • okokMulticharacter
      • Config file
    • okokPhone
    • okokSpawnSelector
      • Config file
      • qb-multicharacter support
    • okokLoadingScreen
      • Config file
    • okokVehicleSales
      • Config file
    • okokShop
      • Config file
    • okokGasStation
      • Config file
    • okokTuning
      • Config file
    • okokGarage
      • Config file
      • RGB vehicle colors
      • Inventories metadata
      • Housing integrations
      • qb-phone support
    • okokVehicleShop
      • Config file
      • Common errors
    • okokBanking
      • Config file
      • Paycheck transactions
      • Registering transactions
    • okokMarketplace
      • Config file
      • Common errors
    • okokChat
      • Config file
      • Export
    • okokBilling
      • Config file
      • Snippets
    • okokCrafting
      • Config file
    • okokContract
      • Config file
    • okokTalkToNPC
      • Config file
    • okokReports
      • Config file
    • okokNotify
      • Config file
      • Snippets
    • okokTextUI
      • Config file
      • Snippets
    • okokRequests
    • okokDeleteVehicles
      • Config file
  • Others
    • Discord Webhook
Powered by GitBook
On this page
  • qb-inventory
  • ox_inventory
  1. Scripts
  2. okokGarage

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',
    },
},
PreviousRGB vehicle colorsNextHousing integrations

Last updated 2 years ago