Having trouble starting up your DarkRP server? We can help! With thousands of hours worth of experience managing our own DarkRP servers, we have the knowledge to make starting your own GMod DarkRP server easy and simple. Follow this guide on how to set up a DarkRP server in a few short steps!

This guide applies to users of our GMod DarkRP Server Hosting, but can mostly be applied to any other GMod hosting service as well. If you want to make the process as easy as possible, we recommend claiming a Free Development Server from our page. We provide 24/7 support, even for our free clients.

Before beginning the steps on this guide, make sure you’ve followed the initial setup guides in our knowledge base.

How to Install DarkRP

To install DarkRP navigate to the Mod Manager tab on an Atomic Networks server in the panel. Click the “Install” button next to the DarkRP mod.

Additionally, you will also want to install “DarkRP Modification” through the Mod Manager. This addon will allow you to change your DarkRP server’s settings through the files that we will discuss later in this guide. You can install this addon by clicking “Install” next to the mod named DarkRP Modification.

Once both files have been installed, you can set the gamemode for your server by navigating to the Startup Parameters Tab (under configuration) on the Atomic Game Panel. In the gamemode text box, enter darkrp

Step 1: Configuring darkrp_config Files

To configure darkrp_config files, you will need to have the “DarkRP Modification” mod installed through the Mod Manager. If you have performed this step, you can configure the files below by navigating to the path /home/container/garrysmod/addons/darkrpmodification/lua/darkrp_config

disabled_defaults.lua

disabled_defaults.lua is the first file we will configure. This file allows you to change some basic settings for DarkRP. In this file, we will show you:

How to Disable Default Shown DarkRP Jobs

To change default shown jobs, pick the job you’d like to disable in the DarkRP.disabledDefaults["jobs"] section of the file, then set the job to true

How to Disable F1/F4 Menu

To disable the F1 menu, set "f1menu" under "DarkRP.disabledDefaults["modules"]" to true

How to Disable FAdmin

Disabling FAdmin is recommended if you want to use another admin system like ULX or SAM. To disable FAdmin set "fadmin" under "DarkRP.disabledDefaults["modules"]" to true

Along with these 3 common settings most people will need to change on this file, you can also change other settings in this file. To change them successfully the first time, read the comments in the disabled_defaults.lua file made by the developer.

settings.lua

settings.lua is a file that allows you to change all the unique small settings for your DarkRP server. You can find it in the pathway /home/container/garrysmod/addons/darkrpmodification/lua/darkrp_config/settings.lua Changing the settings.lua folder is important, as it allows you to change options like:

  • Default laws for the government
  • Whether or not players can spawn vehicles
  • Whether or not players can spawn NPCs
  • Spawn locations
  • And much, much more.

When starting up a new DarkRP server, it’s generally best practice to look through all the settings for this file at least once to change them to your liking. Set your configuration for the settings.lua file and proceed to the next step once you are done.

Step 2: Configure darkrp_customthings Files

darkrp_customthings is a folder inside of the DarkRP Modification addon that allows you to make custom changes to your DarkRP server. In this section, we will cover all of the notable files in this folder, and how to configure them.

Almost every file in this folder can be easily changed using a tool called YourDevTools. This will make your setup process a lot easier.

jobs.lua - How to Add Jobs to DarkRP

To add jobs to DarkRP, you will want to change the jobs.lua file. This file consists of every job you will create for your DarkRP server. Follow the steps below to add a job to your GMod DarkRP server.

  1. Navigate to the /home/container/garrysmod/addons/darkrpmodification/lua/darkrp_customthings/jobs.lua pathway.
  2. Create your DarkRP jobs, you can do this by using a tool like a DarkRP job generator.
  3. Paste your code into the jobs.lua file below the section that says Add your custom jobs under the following line.
  4. Save the jobs.lua file.
/home/container/garrysmod/addons/darkrpmodification/lua/darkrp_customthings/jobs.lua

TEAM_CITIZEN = DarkRP.createJob("Citizen", {
        color = Color(61, 179, 4, 255),
        model = {
            "models/player/Group01/female_01.mdl",
            "models/player/Group01/female_02.mdl",
            "models/player/Group01/female_03.mdl",
            "models/player/Group01/female_04.mdl",
            "models/player/Group01/female_05.mdl",
            "models/player/Group01/female_06.mdl",
            "models/player/Group01/male_01.mdl",
            "models/player/Group01/male_02.mdl",
            "models/player/Group01/male_03.mdl",
            "models/player/Group01/male_04.mdl",
            "models/player/Group01/male_05.mdl",
            "models/player/Group01/male_06.mdl",
            "models/player/Group01/male_07.mdl",
            "models/player/Group01/male_08.mdl",
            "models/player/Group01/male_09.mdl"
        },
        description = [[You're just a good old citizen, hang out around town and roleplay. With such a plain lifestyle - your morals aren't any different - you are neither good nor bad.
    
        RP Context
        > Can RP Base
    ]],
        weapons = {},
        command = "citizen",
        max = 0,
        salary = 0,
        admin = 0,
        vote = false,
        hasLicense = false,
        candemote = false,
        category = "Citizens"
    })

Repeat these steps until you have added in all the jobs you want to have on your server.

doorgroups.lua - How to Add Jobs to Doorgroups in DarkRP

To add jobs to doorgroups in DarkRP, you will want to change the doorgroups.lua file. This file specifies the different door groups on your DarkRP server. To add jobs to a doorgroup, copy/paste the template and:

  1. Change the name of the doorgroup (in the example, it’s “Police”)
  2. Add the different team names of the jobs you’d like to add to the doorgroup. You can find these team names by looking for the job’s title (ex. TEAM_CITIZEN) in the jobs.lua file.
/home/container/garrysmod/addons/darkrpmodification/lua/darkrp_customthings/doorgroups.lua

AddDoorGroup("Police", TEAM_MAYOR, TEAM_SWAT)  

Repeat these steps until you have added in all the doorgroups for your jobs.

demotegroups.lua - How to Add Demote Groups in DarkRP

To make demotions ban a player from an entire group of jobs, you will want to change the demotegroups.lua file. This file specifies the different groups that different demotions fall under. To add demote groups, copy/paste the template and:

  1. Change the name of the demote (in the example, it’s “TESTGROUP”)
  2. Add the different team names of the jobs you’d like to add to the demote group. You can find these team names by looking for the job’s title (ex. TEAM_CITIZEN) in the jobs.lua file.
/home/container/garrysmod/addons/darkrpmodification/lua/darkrp_customthings/demotegroups.lua
   DarkRP.createDemoteGroup("TESTGROUP", {TEAM_CITIZEN, TEAM_THIEF}) 

Repeat these steps until you have added in all the demote groups for your jobs.

groupchats.lua - How to Create Group Chats in DarkRP

To make certain jobs able to talk to each other in group chats, you will want to change the groupchats.lua file. This file determines which jobs can talk to each other in group chat. Usually, server owners like to use this file to make group chats for PD based jobs and criminal organizations. To add group chats, copy/paste the template and replace the “TEAM_” with the TEAM names of the jobs you created in the jobs.lua file.

/home/container/garrysmod/addons/darkrpmodification/lua/darkrp_customthings/groupchats.lua
GAMEMODE:AddGroupChat(TEAM_CITIZEN, TEAM_THIEF)
In the example shown above, TEAM_CITIZEN (Citizen Job) is able to talk to TEAM_THIEF (Thief Job) in a group chat. Repeat these steps until you have added in all the group chats for your jobs.

categories.lua - How to Add Categories for Jobs, Entities, Shipments, Vehicles and Ammo in DarkRP

The categories.lua file allows you to change the way that the different groups for jobs, weapons, ammo, and vehicles are shown in the F4 menu. Change this file when you want to categorize the order and setup of entities shown in the F4 menu.

You can use YourDevTools to edit this file.

The entities that can be assigned the categories you create in this file are:

  • Jobs (in the jobs.lua file)
  • Weapons (in the shipments.lua file)
  • Ammo (in the ammo.lua file)
  • Vehicles (in the vehicles.lua file, this will make it so that players can buy vehicles through the F4 menu)
/home/container/garrysmod/addons/darkrpmodification/lua/darkrp_customthings/categories.lua
  DarkRP.createCategory{
        name = "Criminals", -- This is the name of the category.
        categorises = "jobs", -- Specifies which section the created category is for in the F4 menu: "jobs", "entities", "shipments", "weapons", "vehicles", "ammo".
        startExpanded = true, -- Specifies whether the category is already visible to players when they open the F4 menu.
        color = Color(0, 107, 0, 255), -- The RGB Color of the category.
        canSee = function(ply) return true end, -- Optional: Whether or not the player can see this category.
        sortOrder = 100, -- Optional: Set the sort order when you want a certain category to be shown before another. The lower the #, the higher it will be shown.
        }

Repeat these steps until you have created every category you want to have in the F4 menu.

entities.lua - How to Add Entities to DarkRP Server

The entities.lua file allows you to make entities you add to your server show up on the F4 menu. Whenever you add an addon to your server that you want to be able to be bought by your players, edit this file.

You can use YourDevTools to edit this file. You can also use the template shown below. To add an entity to this file, paste the template and:

  1. Change the Entity ID to the ID of the entity you want to add. To find the ID for an entity:

    • Start a game of GMod with your addons installed.
    • Spawn in the entity you want to find the ID for through the Build (Q) menu.
    • Hold the C button to open the context menu. Hover over the entity, right click, and select “Copy to Clipboard”
  2. Change the model. You can use the model given in the Build (Q) menu or choose another model.

  3. Change the entity price.

  4. Change the maximum # of entities that can be purchased.

  5. Change the / command that will be typed in chat to spawn the entity.

/home/container/garrysmod/addons/darkrpmodification/lua/darkrp_customthings/entities.lua
    DarkRP.createEntity("Tv", { -- This is the name you set for the entity.
        ent = "mediaplayer_tv", -- The Entity ID you grab from Step 1
        model = "models/gmod_tower/suitetv_large.mdl", -- The model shown to players when they see the entity in the F4 menu. 
        price = 20000, -- The price of the entity. 
        max = 1, -- How many of the entity a player can have down at once. We recommend keeping this number as low as you can make it to optimize performance.
        cmd = "tv", -- Specifies the / command that can be typed in chat to spawn this entity in. It has to be unique.
        category = "Other", -- Specifies the category the entity is in (you will need to create the categories in categories.lua)
    })

Repeat these steps until you have added in all the purchasable entities your players can buy onto your server.

shipments.lua - How to Create DarkRP Weapon Shipments

The shipments.lua file allows you to make weapons you add to your server purchasable in the F4 menu. Whenever you add a weapon to your server that you want to be able to be bought by your players, edit this file.

You can use YourDevTools to edit this file. You can also use the template shown below. To add a purchasable weapon to this file, paste the template and:

  1. Change the Weapon ID to the ID of the weapon you want to add. To find the ID for a weapon:
    • Start a game of GMod with your addons installed.
    • Open the Build (Q) Menu and click on the weapons tab.
    • Right click on the weapon you want to add and select “Copy to Clipboard”
  2. Change the name of your shipment. In the example below, the name is “AK47”.
  3. Change the model shown in the F4 menu of the weapon to the model of the weapon. To find the model:
    • Open the Build (Q) Menu.
    • Search the name of your weapon.
    • Find the model that you want to use. Right click on the model and select “Copy to Clipboard”
  4. Optional: Specify the weapon category with a category you created in the categories.lua file.
  5. Set the price of your shipment by changing the pricesep value.
  6. Set the number of weapons that will be in this weapon shipment. If you want to have both singles and shipments on your server, you will need to have two sections of code with different “amount” variables set.
  7. Specify which jobs are allowed to buy the shipment. To make a Gun Dealer job in DarkRP, you will need to add the TEAM_GUNDEALER to the “allowed” section of each weapon shipment.
  8. Optional: If you have a custom shipment model, add it in the shipmodel variable.
/home/container/garrysmod/addons/darkrpmodification/lua/darkrp_customthings/shipments.lua
        DarkRP.createShipment("AK47", { -- Weapon name
            model = "models/m9k/ak47", -- The model shown in the F4 menu for the weapon.
            entity = "weapon_sh_flashbang", -- The Weapon ID found in Step
            category = "Other", -- Specify the weapon category, your category name will be created in categories.lua
            price = 100, -- The price of the weapon (if noship = false and separate = false)
            amount = 1, -- Number of weapons with the shipment (if noship = false and separate = false)
            separate = true,
            pricesep = 1200, -- The price of the weapon sold.
            noship = true,
            allowed = {TEAM_GUN}, -- Specify which jobs are allowed to buy the weapon.
            shipmodel = "models/items/item_item_crate.mdl", -- Model of the weapon case, do not change this unless you have a custom shipment model you want to use.
            })

Repeat these steps until you have added in all the different weapons and shipments to your DarkRP server.

ammo.lua - How to Create DarkRP Ammo

The ammo.lua file allows you to add custom ammo for the different weapons you add to your server. Whenever you add a weapon to your server, you will need to edit it’s weapon file to add your custom ammo.

You can use YourDevTools to edit this file. You can also use the template shown below. To add a new ammo type to this file, paste the template and:

  1. Set the identifer for your Ammo Type. In the example below, the first ammo is identified as “357”
  2. Set the name for your ammo.
  3. Set the model for your ammo, you can find the different types by searching in the Build (Q) menu.
  4. Set the price for your ammo.
  5. Set the amountgiven for your ammo. This will change how many bullets are given per ammo entity purchased.

Below is a copy paste with every ammo type required for the M9K weapon base (except for the 73 Winchester, which uses an ammo type called “AirboatGun”). If you are using M9K, you can copy paste this into your file and it will work correctly.

/home/container/garrysmod/addons/darkrpmodification/lua/darkrp_customthings/ammo.lua
  DarkRP.createAmmoType("357", {
            name = "357 ammo",
            model = "models/Items/357ammobox.mdl",
            price = 200,
            amountGiven = 150
        })
        DarkRP.createAmmoType("ar2", {
            name = "Rifle ammo",
            model = "models/Items/BoxMRounds.mdl",
            price = 200,
            amountGiven = 150
        })
        DarkRP.createAmmoType("buckshot", {
            name = "Shotgun ammo",
            model = "models/Items/BoxBuckshot.mdl",
            price = 200,
            amountGiven = 50
        })
        DarkRP.createAmmoType("pistol", {
            name = "Pistol ammo",
            model = "models/Items/BoxSRounds.mdl",
            price = 200,
            amountGiven = 150
        })
        DarkRP.createAmmoType("smg1", {
            name = "SMG ammo",
            model = "models/Items/BoxMRounds.mdl",
            price = 200,
            amountGiven = 150
        })
        DarkRP.createAmmoType("SniperPenetratedRound", {
            name = "Sniper ammo",
            model = "models/Items/BoxMRounds.mdl",
            price = 200,
            amountGiven = 50
        })

Repeat these steps until you have added in all the different ammo types to your DarkRP server.

Frequently Asked Questions

Below are the answers to some questions that we get asked quite often about setting up a GMod DarkRP server.

How do I disable vehicle collisons in GMod DarkRP?

To disable vehicle collisions in GMod DarkRP, follow these steps:

  • Navigate to the File Manager for your GMod DarkRP Server
  • Navigate to the path /home/container/garrysmod/lua/autorun/server
  • Create a new file in this path called vehicle_collisions.lua
  • Navigate to the File Manager for your GMod DarkRP Server and paste in the following code…
/home/container/garrysmod/lua/autorun/server/vehicle_collisions.lua
        hook.Add("PlayerSpawnedVehicle","DisableCollisionVehicle", function(ply, ent)

        if IsValid(ent) then
      
          ent:SetCollisionGroup(COLLISION_GROUP_WEAPON)
      
        end
      
      end)

How do I disable clientside scripts in GMod DarkRP?

To disable clientside scripts for your GMod DarkRP server, follow these steps:

  • Navigate to the File Manager for your GMod DarkRP Server
  • Navigate to the path /home/container/garrysmod/addons/darkrpmodification/lua/darkrp_config and open the settings.lua file.
  • Once you have this file open, look for GM.Config.disallowClientsideScripts. using Ctrl + F
  • Change the false value to true