DarkRP Shipments

Hello!

Made some shipments, but arent working. I only want the gun dealer to be able to buy them.

I can only see the M4A1, but its only seperate.
**
“After disabling the default Gun Dealer job in disabled_defaults.lua so I could use my modified Gun Dealer which has a different model and weapon loadout, I found that I can no longer buy weapon shipments or separate weapons using this class.
This also happens with my other classes that provide weapons or drugs to players.”**

GM.Config.enablebuypistol is enabled and I have GM.Config.restrictbuypistol set to true, but the modified Gun Dealer class cannot buy anything at all."

Here is shipments.lua



--[[---------------------------------------------------------------------------
DarkRP custom shipments and guns
---------------------------------------------------------------------------

This file contains your custom shipments and guns.
This file should also contain shipments and guns from DarkRP that you edited.

Note: If you want to edit a default DarkRP shipment, first disable it in darkrp_config/disabled_defaults.lua
	Once you've done that, copy and paste the shipment to this file and edit it.

The default shipments and guns can be found here:
https://github.com/FPtje/DarkRP/blob/master/gamemode/config/addentities.lua

For examples and explanation please visit this wiki page:
http://wiki.darkrp.com/index.php/DarkRP:CustomShipmentFields


Add shipments and guns under the following line:
---------------------------------------------------------------------------]]

--PISTOLER - SHIPMENTS

DarkRP.createShipment("Glock 20", {
    model = "models/weapons/w_pist_glock18.mdl",
    entity = "fas2_glock20",
    amount = 10,
    price = 1000,
    separate = false,
    pricesep = 0,
    noship = false,
    category = "Pistoler",
    allowed = {TEAM_GUN},
})

-----------------------------------------------------------------------------

--RIFLER - SHIPMENTS

DarkRP.createShipment("AK-47", {
    model = "models/weapons/w_rif_ak47.mdl",
    entity = "fas2_ak47",
    amount = 10,
    price = 2500,
    separate = false,
    pricesep = 0,
    noship = false,
    category = "Rifler",
    allowed = {TEAM_GUN},
})

-----------------------------------------------------------------------------

--SNIPER RIFLER - SHIPMENTS

DarkRP.createShipment("M21", {
    model = "models/weapons/w_snip_awp.mdl",
    entity = "fas2_m21",
    amount = 10,
    price = 3000,
    separate = false,
    pricesep = 0,
    noship = false,
    category = "Sniper Rifler",
    allowed = {TEAM_GUN},
})

-----------------------------------------------------------------------------

--PISTOLER - SEPERATE

-----------------------------------------------------------------------------

--RIFLER - SEPERATE

DarkRP.createShipment("M4A1", {
    model = "models/weapons/w_rif_m4a1.mdl",
    entity = "fas2_m4a1",
    amount = 10,
    price = 2800,
    separate = true,
    pricesep = 800,
    noship = false,
    category = "Rifler",
    allowed = {TEAM_GUN},
})

-----------------------------------------------------------------------------

--SNIPER RIFLER - SEPERATE

-----------------------------------------------------------------------------

--PISTOLER - AMMO

-----------------------------------------------------------------------------

--RIFLER - AMMO

-----------------------------------------------------------------------------

--SNIPER RIFLER - AMMO


Do you have your “allowed = {TEAM_GUN}” set to match your custom Gun Dealer’s “TEAM =”?

Try it!
Shipment Generator