How to create a DarkRP server?
Thread | |
---|---|
💙 Customer 📖 Posts: 31 ↩️ Replies: 42 ❤️ Reactions: 19 |
Jenny Fer
Posted 1622951322 (Edited) (1390 views)In this guide, we will look at how to create a DarkRP server and more specifically the installation & configuration. DarkRP is one of the best known and most played gamemodes of GMod. It allows you to live adventures in a RolePlay way while playing the character you want.Installation of the DarkRP gamemodeWe will see how to install the gamemode on your server. Go to your management panel. Go to Plugins. Install DarkRP and DarkRP Modification. Restart your server. We will now configure the gamemode. To do this, go to the server files, in the srcds/garrysmod/addons/darkrpmodification/lua/ directory. Configuration of darkrp_configConfiguring the disabled_default.lua This is where you can disable certain features as well as objects and other basic settings in the gamemode. (e.g. disable default jobs) To disable some things by default you just have to replace false with true. Configure the licenseweapons.lua This file allows you to tell the gamemode which weapons do not need a weapon license. To add a weapon, add a line of this style, where class is the ID of the available weapon by right clicking on the weapon in game and then "Copy to clipboard":
Setting up the mysql.lua This file allows you to save the data related to the gamemode directly to an external database. If you don't have your own database yet: Web hosting + SQL. Do not touch the file if you do not want to use an external database. .
Configure the settings.lua Ce fichier vous permet de modifier tous les paramètres du mode de jeu. Par exemple, supprimer les lois par défaut, activer le spawn des véhicules, les npcs, etc. Configuration of darkrp_customthings
This file allows you to change all the gamemode settings. For example, remove default laws, enable vehicle spawn, npcs, etc. Configuring darkrp_customthings Configure the agendas.lua This file allows you to add for some jobs the possibility to have a calendar on the top left of the screen. In the example below TEAM_CHIEF is the only one who can edit the agenda and TEAM_POLICE can see the agenda. You can also allow access to the police diary for another TEAM than TEAM_POLICE: Add a comma after the TEAM_POLICE. And finally, the TEAM you want to put.
You can use this site to avoid errors. Configuring the ammo.lua This file allows you to add ammunition for the weapons. You just have to copy the code below and paste it in the ammo.lua. You will need to change the type of ammunition, available by going to the file for the weapon that needs the ammunition. Search for SWEP.Primary.Ammo and get the ammo type in quotes. Change the price to your liking. Change the number of rounds given.
You can use this site to avoid errors. Configuring categories.lua This file allows you to add categories for jobs, weapons, ammunition, entities and vehicles. Copy the code below. Paste it into categories.lua. Change the category name. Change the category type. Change the colour. Change the order of the category.
You can use this site to avoid errors. Setting up the demotegroups.lua This file allows you to make sure that when a member of a group is demoted, he will be banned from every job in the group. For example, if a person is banned from TEAM_1, he will also be banned from TEAM_2. You can also add a TEAM other than TEAM_1 or TEAM_2. Copy the code below. Paste it in demotegroups.lua. Change the name. Modify the TEAM.
You can use this site to avoid errors. Configuring doorgroups.lua Tired of adding one by one the access to the doors for the jobs? This file is for you! It simply allows you to group all the jobs you want into a single door group! Copy the code below. Paste it in doorgroups.lua. Change the name. Modify the TEAM.
You can use this site to avoid errors. Configuring the entities.lua This file allows you to add entities to the F4. You can add any entity by following the code and instructions below. Modify the ID of the entity, available by right-clicking on the entity in question and then "Copy to clipboard". Modify the model, which you can find in your addon contents. Modify the price as you wish. Modify the maximum number of entities that the person can buy (applicable only on this entity). Modify the order of the entity, it must be different from another order of another entity.
You can use the DarkRP wiki to use advanced features, but also this site to avoid errors. Setting up the food.lua This file allows to add food for the cook. ATTENTION ! the cook job must contain the code piece cook = true. Otherwise, the cook job will not be able to see the food category in your F4 menu. Modify the name of the food. Modify the model, which you can find in your addons content. Change the energy, i.e. the hunger points given by the food. Modify the price as you wish. Modify the access of this food to a certain TEAM.
You can use this site to avoid errors. Configuring groupchats.lua You don't have a radio for police jobs and you want some jobs to be able to communicate with each other via chat? This file is for you! It simply allows you to group all the jobs you want into one group for communication via chat. Copy the code below. Paste it in the file groupchats.lua. Modify the TEAM.
As you can see, TEAM_1 can communicate with TEAM_2, via the chat. You can use this site to avoid errors. Configuring the jobs.lua This file allows you to implement jobs other than the basic DarkRP jobs. The jobs you will add must be below line 17 (strictly) Your job must have a TEAM and a UNIQUE name. A colour for the job. Optional: a category if you have created one before. A playermodel, which can be found here, by decompiling a playermodel addon with this site, or simply, In Game, in your content list. Playermodels are to be put between inverted commas followed by a comma. You will also need a description. A few weapons, to be enclosed in inverted commas and separated by a comma, if you wish to include more than one. A command, which must ABSOLUTELY be unique, it will be used later to set up job spawns. A maximum number of people who can join this job. A salary, which is by default every 2 minutes. Whether the job needs a vote when it is taken. Whether the job has a weapon license.
You can use the DarkRP wiki to use advanced features but also this site to avoid errors. If you use another TEAM than TEAM_CITIZEN then change the TEAM in the code below (at the end of the file) to the new TEAM.
The following code (at the end of the file) indicates which jobs are part of the policy.
Now that you know how to add jobs on your DarkRP server, maybe you want to remove the basic jobs from the game? Edit the file srcds/garrysmod/addons/darkrpmodification/lua/darkrp_config/disabled_defaults.lua. Look in the file for the line DarkRP.disabledDefaults["jobs"] = {. Just below this line, you will find the list of basic jobs. To disable jobs, change the value from false to true.
Save the file and restart your server. Log in to your server, you should no longer see the DarkRP core trades. Configure the shipments.lua This file allows you to add weapons that can be purchased via the F4. The ID of the weapon is available by right-clicking on the weapon in game then "Copy to clipboard". Change the name of the weapon. Modify the model, which you can find in your addon content (the model must be present on the server and when you spawn it must have physics). Change the weapon id. Optional: Add a category. Change the price. Change the number of weapons with shipment. Know if the weapon is sold separately. Change the price of the weapon sold separately. Do not show a crate containing the weapon? Optional: Add a TEAM that can only buy a weapon. Optional: Change the model of the weapon crate.
You can use the DarkRP wiki to use advanced features but also this site to avoid errors. Darkrp_language configuration Basically, the darkrpmodification is not translated. That's why we propose you a translation, this one will be replaced in the darkrp_language. You will have to delete the english.lua file, and replace it by the attached file. Translating the DarkRP weapons (keys, arrest, ...) Let's see how to translate the names of the DarkRP weapons. For that nothing is simpler: Connect to the FTP. Go to srcds/garrysmod/gamemode/darkrp/entities/weapons/. Go to one of the weapons and open the file shared.lua. Change the SWEP.PrintName line. Now change what is in quotes to the name you want. One of the weapons is translated, now you just have to do the same for the others! 😋 |
Replies |
---|
Sign in or register to reply