◾Add Food Categories
Adding custom food categories to your menu.
Since DarkRP does not give category customization for Food; Arivia has provided a solution.
Open lua\modules\arivia\cfg\sh_6_food.lua and locate the table cfg.food.categories; you may add your own categories to this list for food.
cfg.food.categories =
{
[ 'yum' ] =
{
name = 'Yum',
startExpanded = true,
sortOrder = 1,
tip = 'The good stuff',
},
}
Next, locate your entities file and create a food item:
DarkRP.createFood( 'Bunch of bananas',
{
model = "models/props/cs_italy/bananna_bunch.mdl",
energy = 20,
price = 20,
category = 'Yum',
} )
After adding your category code and food entity; open your F4 menu, click Food, and you should see the new category with your item.
Last updated