Articles on: Game Servers

Creating a Gamemode Derived from DarkRP

Creating a Gamemode Derived from DarkRP



Creating a Gamemode Derived from DarkRP is both simple and essential for server owners interested in servers such as MilitaryRP, StarwarsRP, or PoliceRP.

How to Install the DarkRP Gamemode


Installing the DarkRP gamemode is extremely easy, just follow the guide here

Creating your Gamemode



Navigate to files → garrysmod → gamemodes

Then create a new folder, the gamemode name should correlate to the folder name, ensure you're using all lowercase

For this example we will be doing a StarwarsRP gamemode


After creating your folder, create another folder inside named gamemode and a text document correlating to your gamemode name

For this example the text document will be named starwarsrp.txt however if you were doing MilitaryRP it would be militaryrp.txt and so on


Now open the text file you have created and paste the following:

"starwarsrp"
{
"base" "darkrp"
"title" "StarWarsRP"
"version" "1.0.0"
"menusystem" "1"

"author_name" "Harray and FPtje Falco et al."
"author_email" ""
"author_url" "https://github.com/FPtje/DarkRP"

"icon" ""
"info" ""
"hide" "0"
}

You will then change the first entry starwarsrp to correlate to your gamemode if you're not doing a StarwarsRP server

You will also change the title entry StarWarsRP to correlate to your gamemode if you're not doing a StarwarsRP server

Ensure you save the file after you have finished editing!

Now enter the gamemode folder you have created within your gamemode folder

You will create 2 text documents cl_init.lua and init.lua



Then paste the following code within both lua documents:

hook.Run("DarkRPStartedLoading")

GM.Version = "1.0.0"

GM.Name = "StarWarsRP"

GM.Author = "By Harry, FPtje Falco et al."

DeriveGamemode("darkrp")

DEFINE_BASECLASS("gamemode_darkrp")

GM.DarkRP = BaseClass

Ensure you save the file after editing.

Installing DarkRP Modification



Navigate to the Mod Manager

Locate DarkRP Modification under the Addons category and click Install


Navigate to Files → garrysmod → addons → darkrpmodification-master

Rename the folder to darkrpmodification

Then navigate to darkrpmodification → lua

You will now see everything you need to begin your gamemode.

Refer back to this guide for setting your gamemode

Updated on: 28/02/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!