Preset Categories
Here we'll learn how to create a preset category. Not the hardest thing in the world.
Config.Categories = {
["247"] = {
{
label = "General",
id = "general",
products = {
{ label = 'Vehicle Repair Kit', itemId = 'repairkit', price = 4, },
{ label = 'Rubber', itemId = 'rubber', price = 4, },
{ label = 'Copper', itemId = 'copper', price = 4, }
}
},
{
label = "Food",
id = "food",
products = {
{
itemId = 'sandwich',
price = 14,
label = "Bread",
description = "10 Slices of bread",
}
}
}
},
["weaponshop"] = {
{
label = "Pistols",
id = "weapons",
products = {
{
itemId = 'weapon_pistol',
label = 'Glock',
description =
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
price = 2500,
image =
'https://upload.wikimedia.org/wikipedia/commons/b/b4/Glock_17_MOD_45154998_%28Transparent%29.png'
}
}
},
{
label = "Rifles",
id = "rifles",
products = {
{
itemId = "weapon_carbinerifle",
label = "Carbine Rifle",
description = "En karbin rifle",
price = 20,
image = "https://r2.fivemanage.com/LRlfVgIK7NNsxmVbS4FS5/images/carbine-rifle.png"
}
}
},
{
label = "Ammo",
id = "ammo",
products = {
{
itemId = "ammo_pistol",
label = "Pistol Ammo",
description = "10 bullets",
price = 20,
image = "https://r2.fivemanage.com/LRlfVgIK7NNsxmVbS4FS5/images/ammo-pistol.png"
}
}
}
}
}Category interface
Product interface
How do i use it?
Last updated