Step 4
Items for your inventory
Add this items in the sql
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`, `x`, `y`, `category`, `componentTint`, `componentHash`, `backpackModel`, `backgroundTexture`, `description`) VALUES
('vehiclekeys', 'Vehicle Keys', '1', '0', '1', '1', '1', 'vehiclekeys', NULL, NULL, NULL, NULL, 'A small and sweet casting.'),
('plate', 'Plate', '1', '0', '1', '1', '1', 'vehiclekeys', NULL, NULL, NULL, NULL, 'A plate.'),
('carlockpick', 'Car LockPick', '1', '0', '1', '1', '1', 'vehiclekeys', NULL, NULL, NULL, NULL, 'A Lockpick.'),
('caradvancedlockpick', 'Car Advanced Lockpick', '1','0', '1', '2', '2', 'vehiclekeys', NULL, NULL, NULL, NULL, 'If you lose your keys a lot this is very useful.');
('screwdriver', 'Screwdriver', '1','0', '1', '2', '2', 'vehiclekeys', NULL, NULL, NULL, NULL, 'Tool used to change plate.');
Add the items in you inventory
If you have the latest version of qs-inventory, you don't need to add anything, everything works by default.
qs-inventory/shared/items.lua
['vehiclekeys'] = {
['name'] = 'vehiclekeys',
['label'] = 'Vehicle Keys',
['weight'] = 50,
['type'] = 'item',
['image'] = 'vehiclekeys.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'A small and sweet casting.'
},
['plate'] = {
['name'] = 'plate',
['label'] = 'Plate',
['weight'] = 50,
['type'] = 'item',
['image'] = 'plate.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'A plate.'
},
['carlockpick'] = {
['name'] = 'carlockpick',
['label'] = 'Carlockpick',
['weight'] = 50,
['type'] = 'item',
['image'] = 'carlockpick.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'A Lockpick.'
},
['caradvancedlockpick'] = {
['name'] = 'caradvancedlockpick',
['label'] = 'Car Advanced Lockpick',
['weight'] = 500,
['type'] = 'item',
['image'] = 'advancedlockpick.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'If you lose your keys a lot this is very useful... Also useful to open your beers'
},
ox_inventory/data/items.lua
["vehiclekeys"] = {
label = "Keys",
weight = 1,
stack = false,
close = false,
consume = 0,
client = {
export = 'qs-vehiclekeys.useKey',
},
},
['plate'] = {
label = 'Plate',
weight = 100,
stack = true,
close = false,
consume = 0,
client = {
export = 'qs-vehiclekeys.usePlate',
},
},
['carlockpick'] = {
label = 'Car Lockpick',
weight = 100,
stack = true,
close = false,
description = "Plate for vehicle",
client = {
export = 'qs-vehiclekeys.useCarlockpick',
},
},
['caradvancedlockpick'] = {
label = 'Advanced Lockpick',
weight = 100,
stack = true,
close = false,
description = "Plate for vehicle",
client = {
export = 'qs-vehiclekeys.useAdvancedCarlockpick',
},
},
add this on core_inventory/config.lua on ItemCategories
["vehiclekeys"] = {
color = "#62a859",
takeSound = 'take_fabric',
putSound = 'put_fabric',
},
Last updated