跳至主要内容

How to Set Up DarkRP Mode

Guide to customizing jobs, weapons, and settings

DarkRP is one of the most popular gameplay modes for Garry’s Mod. Here you'll find everything: from installing the mode to creating your own jobs and weapons. Let’s go.


🚀 Step 1: Installing and activating DarkRP

  1. In the control panel (pyro.mikasa.host) go to Startup Settings -> Workshop ID and make sure your collection includes the DarkRP addon (ID: 596704786).

  2. In the Gamemode field, enter darkrp.

  3. In the Startup Command, make sure +host_workshop_collection contains your collection with DarkRP.

  4. Download DarkRP Modification, upload the archive to the server into garrysmod/addons/, then unzip it there.

Restart the server — it will now load DarkRP as default.


🗂️ Step 2: DarkRP file structure

garrysmod/
└── addons/
└── darkrpmodification/
├── gamemode/
│ ├── cfg/
│ │ ├── darkrp_config.lua
│ │ └── jobs.lua
│ └── entities/
└── lua/
└── weapons/
  • darkrp_config.lua — basic settings (taxes, salaries, global options).
  • jobs.lua — job definitions.
  • weapons/ — folder for custom weapons.

⚙️ Step 3: Configuring jobs

Open garrysmod/addons/darkrpmodification/gamemode/cfg/jobs.lua and add or modify job blocks:

-- Example job
TEAM_CHEF = DarkRP.createJob("Chef", {
color = Color(242, 133, 0, 255),
model = {"models/player/Group01/Female_01.mdl"},
description = [[Cooks food for money.]],
weapons = {},
command = "cook",
max = 3,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})
  • command — chat command (/cook).
  • max — max players for this job.
  • salary — income per tick.
  • vote = true — job requires voting.

Add more jobs, adjust as needed, and save the file.


🔫 Step 4: Adding your own weapon

  1. Create folder garrysmod/addons/darkrpmodification/lua/weapons/my_weapon/.

  2. Inside, create shared.lua:

    SWEP.PrintName = "My Pistol"
    SWEP.Author = "YourName"
    SWEP.Spawnable = true
    SWEP.AdminOnly = false

    SWEP.Primary.ClipSize = 12
    SWEP.Primary.DefaultClip = 36
    SWEP.Primary.Automatic = false
    SWEP.Primary.Ammo = "Pistol"

    SWEP.UseHands = true
    SWEP.ViewModel = "models/weapons/c_pistol.mdl"
    SWEP.WorldModel = "models/weapons/w_pistol.mdl"
  3. In darkrp_config.lua, add to allowed weapons list:

    DarkRP.addWeapon("My Pistol", "my_weapon")
  4. Save and restart the server.


🔧 Step 5: Other important settings in darkrp_config.lua

  • Taxes and salaries:

    GM.Config.tax = 0.10 -- 10% tax
    GM.Config.pay = 60 -- base salary
    GM.Config.paydelay = 300 -- every 5 minutes
  • Limits:

    GM.Config.maximumdoors = 2
    GM.Config.maxvehicles = 10
  • Purchaseable items:

    DarkRP.createEntity("Ammo Box", {
    ent = "spawned_ammo",
    model = "models/Items/BoxSRounds.mdl",
    price = 50,
    max = 5,
    cmd = "buyammo"
    })

🔄 Step 6: Applying changes

  1. Save all files.
  2. In the control panel, click Restart Server.
  3. Test changes in-game.