Create Items
If you want to use items for graffiti, rope etc. you need to create them based on the inventory script you're using.
If inventory which you use is not on this list - Create Items regarding to other items in your inventory script.
File Location: ox_inventory/data/items.lua
Image Should Be placed in: ox_inventory/web/images
['crime_tablet'] = {
label = 'Crime Tablet',
weight = 1,
type = 'item',
image = 'tablet.png', -- Optional, if you want an image for it
useable = true,
description = 'A tablet for various crime-related tasks.',
client = {
event = 'op-crime:openCrimeTablet'
}
},
['rope'] = {
label = "Rope",
weight = 250,
client = {
event = "op-crime:openHandcuffsMenu",
}
},
['spray_remover'] = {
label = "Spray Remover",
weight = 250,
client = {
event = "op-crime:useRemover",
}
},
['spray_can'] = {
label = "Gang Spray Can",
weight = 1500,
client = {
event = "op-crime:useSpray",
}
},
['cocaine'] = {
label = "Cocaine 1g",
weight = 1,
},
['meth'] = {
label = "Crystal Meth 1g",
weight = 1,
},
['weed'] = {
label = "Weed 1g",
weight = 1,
},File Location: qb-core/shared/items.lua
Image Should Be placed in: qb-inventory/html/images
crime_tablet = {
name = 'crime_tablet',
label = 'Crime Tablet',
weight = 1,
type = 'item',
image = 'tablet.png', -- Optional, if you want an image for it
useable = true,
shouldClose = true,
description = 'A tablet for various crime-related tasks.' ,
client = {
event = "op-crime:openCrimeTablet"
}
},
rope = {
name = 'rope',
label = 'Rope',
weight = 250,
type = 'item',
image = 'rope.png',
useable = true,
shouldClose = true,
description = 'A rope that can be used for restraining or other tasks.',
client = {
event = "op-crime:openHandcuffsMenu"
}
},
spray_remover = {
name = 'spray_remover',
label = 'Spray Remover',
weight = 250,
type = 'item',
image = 'spray_remover.png',
useable = true,
shouldClose = true,
description = 'Removes gang graffiti from walls.',
client = {
event = "op-crime:useRemover"
}
},
spray_can = {
name = 'spray_can',
label = 'Gang Spray Can',
weight = 1500,
type = 'item',
image = 'spray_can.png',
useable = true,
shouldClose = true,
description = 'Used to spray graffiti in gang territories.',
client = {
event = "op-crime:useSpray"
}
},
cocaine = {
name = 'cocaine',
label = 'Cocaine 1g',
weight = 1,
type = 'item',
image = 'cocaine.png',
useable = true,
shouldClose = true,
description = 'A gram of cocaine.'
},
meth = {
name = 'meth',
label = 'Crystal Meth 1g',
weight = 1,
type = 'item',
image = 'meth.png',
useable = true,
shouldClose = true,
description = 'A gram of crystal meth.'
},
weed = {
name = 'weed',
label = 'Weed 1g',
weight = 1,
type = 'item',
image = 'weed.png',
useable = true,
shouldClose = true,
description = 'A gram of weed.'
},
This is MySql insert.
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
("rope", "Rope", 250, 0, 1),
("spray_remover", "Spray Remover", 250, 0, 1),
("spray_can", "Gang Spray Can", 1500, 0, 1),
("cocaine", "Cocaine 1g", 1, 0, 1),
("meth", "Crystal Meth 1g", 1, 0, 1),
("weed", "Weed 1g", 1, 0, 1);
INSERT INTO `items`(`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ("crime_tablet", "Crime Tablet", 1, 0, 1)['crime_tablet'] = {
name = 'crime_tablet',
label = 'Crime Tablet',
weight = 5,
type = 'item',
image = 'tablet.png', -- Optional, if you want an image for it,
unique = false,
useable = true,
description = 'A tablet for various crime-related tasks.',
client = {
export = 'op-crime.openCrimeTablet'
},
},
['rope'] = {
name = 'rope',
label = 'Rope',
weight = 250,
type = 'item',
image = 'rope.png',
unique = false,
useable = true,
description = 'A rope that can be used for restraining or other tasks.',
client = {
export = 'op-crime.openHandcuffsMenu'
},
},
['spray_remover'] = {
name = 'spray_remover',
label = 'Spray Remover',
weight = 250,
type = 'item',
image = 'spray_remover.png',
unique = false,
useable = true,
description = 'Removes gang graffiti from walls.',
client = {
export = 'op-crime.useRemover'
},
},
['spray_can'] = {
name = 'spray_can',
label = 'Gang Spray Can',
weight = 1500,
type = 'item',
image = 'spray_can.png',
unique = false,
useable = true,
description = 'Used to spray graffiti in gang territories.',
client = {
export = 'op-crime.useSpray'
},
},
['cocaine'] = {
name = 'cocaine',
label = 'Cocaine 1g',
weight = 1,
type = 'item',
image = 'cocaine.png',
unique = false,
useable = true,
description = 'A gram of cocaine.',
},
['meth'] = {
name = 'meth',
label = 'Crystal Meth 1g',
weight = 1,
type = 'item',
image = 'meth.png',
unique = false,
useable = true,
description = 'A gram of crystal meth.',
},
['weed'] = {
name = 'weed',
label = 'Weed 1g',
weight = 1,
type = 'item',
image = 'weed.png',
unique = false,
useable = true,
description = 'A gram of weed.',
},Last updated