Create your addons
Create a weapon
Add a new weapon prefab with model, sounds, fire rate, damage, and view-model.
A weapon in s&box / DarkRP is a prefab component attached to a model, with fire / reload / sway logic in C# and assets (model, sounds, view-model) bundled with the addon.
Coming soon. This recipe will walk through:
- Anatomy of a DarkRP weapon (component + prefab + model + sounds)
- Creating the weapon prefab in the s&box editor
- Importing assets — world model, view-model, fire/reload sounds
- Writing the C# component — inheriting from the base
Weaponclass - Wiring up fire rate, damage, ammo type, magazine size, reload time
- Configuring the view-model — IK, attachments, animations
- Custom crosshair / HUD elements (optional)
- Pickup behavior — spawn from F4 menu, ATM purchase, or world spawn
- Testing in the s&box editor
- Publishing the addon and selling / spawning the weapon in-game
A reference implementation is DarkRP's built-in weapons — darkrp/Code/Modules/Weapons/ has ~17 examples covering pistols, rifles, melee, and special weapons.
Next steps
- Create a job — assign the weapon to a specific role's loadout
- Create a vehicle — for when a weapon isn't enough