nooblottery.blogg.se

How to install a darkrp gamemode
How to install a darkrp gamemode











how to install a darkrp gamemode
  1. #How to install a darkrp gamemode how to#
  2. #How to install a darkrp gamemode code#

Otherwise, all players will see the chatcommand and arguments in their chat boxes! When using DarkRP chat commands, you must return a empty string. Trace.endpos = trace.start + ply:GetAimVector ( ) * 85Īnd finally, we create the money using the trace information:ĭarkRPCreateMoneyBag (tr.HitPos, amount ) Next, we create a trace object of where the playing is looking at. Ply:ChatPrint ( "You are not authorized to use this chat command!" ) return end Notify (ply, 1, 4, string.format (LANGUAGE.invalid_x, "argument", "" ) ) return "" end if ply:IsSuperAdmin ( ) then Local amount = math.floor ( tonumber (args ) ) if amount <= 1 then Next, we check if the value they are trying to create is lower than 1, or if the player that is trying to create cash, is not a superadmin. Local function CreateCash (ply, args ) if args = "" then return "" end if not tonumber (args ) then return "" end local amount = math.floor ( tonumber (args ) ) if amount

#How to install a darkrp gamemode code#

It should work just the same, but the work wont get lost at updates.Īdd the following code to the bottom of a: You could also paste this in a new lua file in gamemodes/modules. In this tutorial we will be using the default DarkRP a file!

#How to install a darkrp gamemode how to#

I will be showing you how to add a new chat command that creates money from nothing!

  • Optional: Change the model of the weapon case.Welcome to the tutorial, in this tutorial.
  • Optional: Add a TEAM that can only buy a weapon.
  • AddCustomVehicle (< One of the vehicles from the rpgetvehicles list. Choose the vehicle your going to use, find it's corresponding rpgetvehicles name, and write it down or remember it. It should print a list of vehicles into your console.
  • Don't spawn a crate containing the weapon? Firstly, install your custom vehicle pack (if your using one), then go in-game and type rpgetvehicles.
  • Change the price of the weapon sold separately.
  • Find out if the weapon is sold separately.
  • Modify the number of weapons with shipments.
  • Modify the model, which you can find in your content addons (the model must be present on the server and when you do spawn it must have physics).
  • The weapon ID is available by right clicking on the weapon and then "Copy to clipboard". This file allows you to add weapons purchasable via F4.
  • Log into your server, you should no longer see the default DarkRP jobs.
  • If you are using another TEAM than TEAM_CITIZEN, change the TEAM in the code below (present at the end of the file) by the new TEAM. You can use the DarkRP wiki in order to use advanced functions but also this site to generate your jobs. HasLicense = false, - Have a basic weapon license? Vote = false, - Need a vote to take the job? Max = 3, - Maximum number of players in the job (0 = no limit)Īdmin = 0, - Job admin? (0 = no, 1 = admin and +, 2 = superadmin) TEAM_POMPIER = DarkRP.createJob ("Fireman",, - Weapon for the jobĬommand = "firefighter", - Job command (must always be unique) You can also allow access to the police agenda for a different TEAM than the TEAM_POLICE: In the example below, only the TEAM_CHIEF job can edit the calendar, while the TEAM_POLICE job cannot edit it. This file allows you to add the possibility to have a calendar at the top left of the screen, for the desired jobs. Configuring darkrp_customthings Configure a This file allows you to change all settings in the DarkRP gamemode, for example, remove default laws, enable spawn of vehicles, npcs, etc.
  • Replace the database settings with your SQL settings.
  • RP_MySQLConfig.Preferred_module = "mysqloo" RP_MySQLConfig.Database_name = "XXXXX_sql" RP_MySQLConfig.Password = "your sql password" To add a weapon, add a row, where class is the ID of the weapon (available by right clicking on the weapon at stake, then puis Copy to Clipboard . This file is used to specify which weapons do not require a weapon license. To disable features, simply change false to true. It is in this file that you can disable features, as well as objects and other basic settings of DarkRP (e.g.: disable default jobs). Configuring darkrp_config Configure disabled_a To do this, go to the server files in the srcds/garrysmod/addons/darkrpmodification/lua/ directory.
  • Install DarkRP and DarkRP Modification.
  • The installation of the DarkRP gamemode is done in a few clicks thanks to the management panel of your GMod server. It allows you to experience ever more original RolePlay adventures How to install DarkRP In this guide, we'll see how to make a DarkRP server (installation and configuration).ĭarkRP is the most played gamemode of GMod.













    How to install a darkrp gamemode