Drugs show up under weapons tab instead of shipments tab, buyable by any job.

I’m currently testing this drug dealer job and the entities that work with it. However, drugs seem to show up, inside of my category, under the “weapons” tab rather than the shipments tab, which appears to be darkened. I can also buy drugs regardless of my current job. I am the only one who has tested this, and I’m a server administrator, if that’s relevant.

Here’s how I’m doing everything:
All lua files are inside of addons/darkrpmodification-master/lua/darkrp_customthings/

jobs.lua


TEAM_DRUGGY = DarkRP.createJob("Drug Dealer", {
    color = Color(51, 204, 255, 255),
    model = "models/player/Kleiner.mdl",
    description = [[You deal drugs to those in need.
                Be careful, may get arrested if caught in the act!]],
    weapons = {},
    command = "drug",
    max = 2,
    salary = 65,
    admin = 0,
    vote = false,
    hasLicense = false,
    category = "Citizens"
})


entities.lua


DarkRP.createShipment("Alchohol", {
    model = "models/drug_mod/alcohol_can.mdl",
    entity = "durgz_alcohol",
    price = 500,
    amount = 10,
    separate = true,
    pricesep = 215,
    noship = true,
    category = "Drugs",
	allowed = {TEAM_DRUGGY}
})

categories.lua


DarkRP.createCategory{
    name = "Drugs", -- The name of the category.
    categorises = "shipments", -- What it categorises. MUST be one of "jobs", "entities", "shipments", "weapons", "vehicles", "ammo".
    startExpanded = true, -- Whether the category is expanded when you open the F4 menu.
    color = Color(51, 204, 255, 255), -- The color of the category header.
    canSee = function(ply) return true end, -- OPTIONAL: whether the player can see this category AND EVERYTHING IN IT.
    sortOrder = 101, -- OPTIONAL: With this you can decide where your category is. Low numbers to put it on top, high numbers to put it on the bottom. It's 100 by default.
}

Make the category show entities, not shipments.

Use this


DarkRP.createEntity( "Alcohol", { 
   ent = "durgz_alcohol",
   model = "models/drug_mod/alcohol_can.mdl",
   price = 50, -- $50 per can
   max = 20, -- 20 max cans 
   cmd = "buyalchohol",
   allowed = {TEAM_DRUGGY},
   category = "Drugs",
})

This will put it into the entities tab instead of the weapons tab

Pretty sure it will only go under the shipments tab if it is not separate, but instead bought in a shipment.

If you want it to be a shipment, put this in shipments.lua and make sure the category shows shipments, not entities


DarkRP.createShipment("Alcohol", {
    model = "models/drug_mod/alcohol_can.mdl",
    entity = "durgz_alcohol",
    price = 500, -- Price of shipment
    amount = 10, -- 10 cans per shipment
    separate = false,
    pricesep = 215,
    noship = false,
    allowed = {TEAM_DRUGGY},
})

Why do I always see darkrp code with ‘,’ at the end of a table? Isn’t the last value in a table not supposed to have a comma?
Anyways, I see the drugs under miscellaneous now when I am a drug dealer. Tyty.

Because it doesn’t make a difference and people are lazy.