1. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

[SOLVED] Custom Category Not Shown

Discussion in 'DarkRP Modding Questions & Help' started by sykeitsgod, Nov 29, 2017.

Tags:
  1. sykeitsgod

    sykeitsgod New Member

    Solved

    So I'm having a bit of an issue with custom categories.
    I've created several in the past and they all work fine, yet 1 certain category isn't.
    I'm making a Vape Dealer for my server and the category I made won't shop up under the weapons tab in the F4 menu.
    Any help would be appreciated!

    This is the code to the job I'm linking to the category.

    Code (Text):
    TEAM_VAPE = DarkRP.createJob("Vape Dealer", {
        color = Color(20, 199, 0, 255),
        model = {"models/snoopdogg.mdl"},
        description = [[Vape god. Open a store and sell your products!]],
        weapons = {"keys", "itemstore_pickup", "weapon_vape"},
        command = "vape",
        max = 1,
        salary = 50,
        admin = 0,
        vote = false,
        hasLicense = false,
        candemote = true,
        category = "Dealers",
        sortorder = 5
    })

    This is the code for the category

    Code (Text):
    DarkRP.createCategory{
        name = "Vapes",
        categorises = "weapons",
        startExpanded = true,
        color = Color(17, 85, 51, 255),
        canSee = function(ply) return table.HasValue({TEAM_VAPE}, ply:Team()) end,
        sortOrder = 1
    }
     
    Last edited: Dec 2, 2017
  2. Trinity

    Trinity Member

    Maybe this is a long shot but I believe you have to have something in the category for it to show up. For example: If I make the category "Vapes" I need to have an entity/weapon/etc. as a place holder for the category to show up in the F4 menu. The category won't show up if you have nothing in it (I believe).

    The only other thing I could think of is to put a comma at the end of your sortorder line for both category and job.

    Also...

    TEAM_VAPE = DarkRP.createJob("Vape Dealer", {
    color = Color(20, 199, 0, 255),
    model = {"models/snoopdogg.mdl"},
    description = [[Vape god. Open a store and sell your products!]],
    weapons = {"keys", "itemstore_pickup", "weapon_vape"},
    command = "vape",
    max = 1,
    salary = 50,
    admin = 0,
    vote = false,
    hasLicense = false,
    candemote = true,
    category = "Dealers",
    sortOrder = 5
    })
     
  3. sykeitsgod

    sykeitsgod New Member

    You're a saint! Thanks so much!
     
    Trinity likes this.
  4. Trinity

    Trinity Member

    no prob
     

Share This Page