Garry's Mod 4 minute read
Create a DarkRP shipment
Find weapon classes and models, then sell them through your gun dealers.
Shipments let gun dealers buy crates of weapons to sell, and can also offer single weapons straight from the F4 menu.
Find the Weapon Class
Every weapon has a class name. Open the spawn menu with Q, go to the Weapons tab, right click the weapon and choose Copy to Clipboard. For addon weapons, the class is also the folder name under lua/weapons.
Find the World Model
The model shown in the F4 menu is usually the weapon's world model, which starts with models/weapons/w_. Addon weapons set it as SWEP.WorldModel in their Lua file.
Generate the Shipment
Open the Shipment Generator, enter the name, class and model, then choose how it sells:
- Shipments only: dealers buy a crate and sell the weapons on.
- Single weapons only: players buy one weapon at a time.
- Both: offers both, each with its own price.
Use Allowed Jobs to limit purchases to jobs like TEAM_GUN.
Add It to shipments.lua
- Open
addons/darkrpmodification/lua/darkrp_customthings/shipments.lua. - Paste the code at the bottom and save.
- Restart the server or change the map.
If you set a category, it must exist with categorises = "shipments", or "weapons" for single weapons.