Arivia
Browse ScriptsDownload RLIB
v3.x
v3.x
  • Introduction
  • Select Version
  • Showcase
  • Changelog
    • ◾3.0.0.6-beta
    • ◾3.0.0.5-beta
    • ◾3.0.0.4-beta
    • ◾3.0.0.3-beta
    • ◾3.0.0.2-beta
    • ◾3.0.0.1-alpha
  • FAQ
    • ◾Add Food Categories
    • ◾Addon Won't Show
    • ◾Incompatible Addons
    • ◾Custom Category Colors
    • ◾Hide Unavailable Jobs
    • ◾Modified Script
    • ◾Refunds
    • ◾Script Errors
    • ◾When Are Updates?
  • ❱ Setup
    • ◾Install
    • ◾Verify
    • ◾Workshop
    • ◾Docs/Web
  • ❱ Configuration
    • ◾Env
    • ◾Fonts
    • ◾Languages
    • ◾Settings
      • sh_4_tabs.lua
        • bUseModelImage
        • styleB
    • ◾Visual Blueprints
  • ❱ First Use
    • ◾Binds
    • ◾Console Commands
      • ▸arivia.listjobs
      • ▸arivia.getjob
      • ▸arivia.setjob
  • ❱ Developers
    • ◾Jobs
      • ▸Parameters
        • tip
        • NeedJob
        • NeedGroup
      • ▸Sorting
    • ◾Entities
      • ▸accent
      • ▸allowed
      • ▸customHideUnavail
      • ▸level
      • ▸prestige
      • ▸price
      • ▸tip
    • ◾Food
      • ▸category
    • ◾Categories
      • ▸tip
  • ❱ Internal
    • ◾Rules
    • ◾Web Demo
  • ❱ DOC REFERENCES
    • ◾Status
Powered by GitBook
On this page
  1. FAQ

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',
} )

DarkRP may require that you restart your server after adding entities to the provided darkrp mods files.

After adding your category code and food entity; open your F4 menu, click Food, and you should see the new category with your item.

PreviousFAQNextAddon Won't Show

Last updated 4 years ago

◾