DarkRP:Shipments

A Shipment Would Look Like This (line breaks added for clarity):

DarkRP.createShipment("AK47", {               -- Name of the shipment    model = "models/weapons/w_rif_ak47.mdl",    -- The model that the shipment spawns (should be the world model...)    entity = "weapon_ak472",                    -- The class name of the weapon. Usually something of the form weapon_something.    price = 2450,                               -- The price of one shipment    amount = 10,                                -- How many guns there are in one shipment    separate = false,                           -- Whether the item in this shipment is also sold separately    pricesep = nil,                             -- OPTIONAL: The price of a single weapon when sold separately    noship = false,                             -- OPTIONAL: True/false, whether this weapon is sold in a shipment    allowed = {TEAM_GUN},                       -- OPTIONAL: List of jobs who can buy the shipment category = "Rifles",                       -- OPTIONAL: The category the shipment should be in, in the F4 menu })

Here's a HL2 Pistol Shipment:

DarkRP.createShipment("HL2pistol", {  model = "models/weapons/W_pistol.mdl",    entity = "weapon_pistol",    price = 500,    amount = 10,    separate = false,    pricesep = 200,    noship = false,    allowed = {TEAM_GUN} })

The Layout:
Shipment("HL2pistol") = The name displayed in the F4 menu.

"models/weapons/W_pistol.mdl" = The model to come out of the shipment when used (NEVER USE V_ OR C_ MODELS).

"weapon_pistol" = The entity that comes out, for weapons use the name of the folder in /lua/weapons, you can use weapons from your addons without having to move them over into DarkRP. For entities use the name of the folder in /lua/entities, again you can use entities from your addons without having to move them over into DarkRP.

500 = The default price of the full shipment, can be changed in-game too.

10 = Decides how many objects are stored in the shipment.

false = Not sold separately. If you set this to true, players will be able to buy just 1 of the entity in-game, regardless of their class, set to false and it will be only available via a shipment from the gun dealer.

200 = Price when sold separately, you only need to set this if the above is true, this is the cost of just 1 of the entity.

false = /buy only, if you set this to true you will only be able to buy this shipment separately, not as a shipment.

{TEAM_GUN} = The teams that can buy the shipment, use the TEAM_ you set for the team in jobrelated.lua, you can add more than 1 team by separating them with commas, eg: {TEAM_GUN, TEAM_CHIEF}.

Here are some shipments to get you going:
WARNING: You need Counter-Strike Source Realistic Weapons 4 , You can get it here. -- CS:S Weps DarkRP.createShipment("M249", { model = "models/weapons/w_mach_m249para.mdl",   entity = "weapon_real_cs_m249",   price = 6000,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("Galil", {  model = "models/weapons/w_rif_galil.mdl",   entity = "weapon_real_cs_galil",   price = 4000,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("AK47", {  model = "models/weapons/w_rif_ak47.mdl",   entity = "weapon_real_cs_ak47",   price = 4000,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("M4A1", {  model = "models/weapons/w_rif_m4a1.mdl",   entity = "weapon_real_cs_m4a1",   price = 3900,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("Famas", {  model = "models/weapons/w_rif_famas.mdl",   entity = "weapon_real_cs_famas",   price = 3900,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("AWP", {  model = "models/weapons/w_snip_awp.mdl",   entity = "weapon_real_cs_awp",   price = 5000,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("Scout", {  model = "models/weapons/w_snip_scout.mdl",   entity = "weapon_real_cs_scout",   price = 4500,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("SteyrAug", {  model = "models/weapons/w_rif_aug.mdl",   entity = "weapon_real_cs_aug",   price = 4000,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("SG552", {  model = "models/weapons/w_rif_sg552.mdl",   entity = "weapon_real_cs_sg552",   price = 4000,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("G3SG1", {  model = "models/weapons/w_snip_g3sg1.mdl",   entity = "weapon_real_cs_g3sg1",   price = 4000,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("SG550", {  model = "models/weapons/w_snip_sg550.mdl",   entity = "weapon_real_cs_sg550",   price = 4000,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("UMP45", {  model = "models/weapons/w_smg_ump45.mdl",   entity = "weapon_real_cs_ump_45",   price = 3600,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("P90", {  model = "models/weapons/w_smg_p90.mdl",   entity = "weapon_real_cs_p90",   price = 3500,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("TMP", {  model = "models/weapons/w_smg_tmp.mdl",   entity = "weapon_real_cs_tmp",   price = 3500,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("MP5", {  model = "models/weapons/w_smg_mp5.mdl",   entity = "weapon_real_cs_mp5a5",   price = 3200,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("Mac10", {  model = "models/weapons/w_smg_mac10.mdl",   entity = "weapon_real_cs_mac10",   price = 3000,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("AutoShotgun", {  model = "models/weapons/w_shot_xm1014.mdl",   entity = "weapon_real_cs_xm1014",   price = 3000,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("Shotgun", {  model = "models/weapons/w_shot_m3super90.mdl",   entity = "weapon_real_cs_pumpshotgun",   price = 2500,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("Grenade", {  model = "models/weapons/w_eq_fraggrenade.mdl",   entity = "weapon_real_cs_grenade",   price = 15000,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("Flash", {  model = "models/weapons/w_eq_flashbang_thrown.mdl",   entity = "weapon_real_cs_flash",   price = 2000,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("Smoke", {  model = "models/weapons/w_eq_smokegrenade.mdl",   entity = "weapon_real_cs_smoke",   price = 2000,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("DualElites", {  model = "models/weapons/w_pist_elite_dropped.mdl",   entity = "weapon_real_cs_elites",   price = 2300,   amount = 10,   separate = true,   pricesep = 250,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("Deagle", {  model = "models/weapons/w_pist_deagle.mdl",   entity = "weapon_real_cs_desert_eagle",   price = 2300,   amount = 10,   separate = true,   pricesep = 250,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("USP", {  model = "models/weapons/w_pist_usp.mdl",   entity = "weapon_real_cs_usp",   price = 2200,   amount = 10,   separate = true,   pricesep = 240,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("P228", {  model = "models/weapons/w_pist_p228.mdl",   entity = "weapon_real_cs_p228",   price = 2100,   amount = 10,   separate = true,   pricesep = 220,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("Glock", {  model = "models/weapons/w_pist_glock18.mdl",   entity = "weapon_real_cs_glock18",   price = 2000,   amount = 10,   separate = true,   pricesep = 210,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("FiveSeven", {  model = "models/weapons/w_pist_fiveseven.mdl",   entity = "weapon_real_cs_five-seven",   price = 1900,   amount = 10,   separate = true,   pricesep = 200,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

DarkRP.createShipment("Knife", {  model = "models/weapons/w_knife_t.mdl",   entity = "weapon_real_cs_knife",   price = 2000,   amount = 10,   separate = false,   pricesep = 0,   noship = false,   allowed = {TEAM_GUN, TEAM_ADMIN} })

There is an Admin class above who is also allowed to buy them, so its available to only admins and gun dealers.

Here's the code for the Admin class if you would like to use it, read the guide on adding custom jobs if you're unsure what to do with it.

TEAM_ADMIN = DarkRP.createJob("Admin Police", {  color = Color(255, 255, 255, 255),    model = "models/player/Combine_Super_Soldier.mdl",    description = The Admin Police is only used by admins, they do the most basic admin things.,    weapons = {"Glock", "StunStick", "Arrest Baton", "Unarrest Baton"},    command = "adminpolice",    max = 3,    salary = 50,    admin = 1,    vote = false,    hasLicense = true,    NeedToChangeFrom = TEAM_POLICE })