• Garry's Mod DarkRP server building and scripting.Complete guide.
    5 replies, posted
Hello guys, This tutorial is here to show you how to make a Garry's Mod DarkRP server and script it.All that I have learnt so far. So lets start! [B][I][U]Part 1.Creating the DarkRP server.[/U][/I][/B] [B]1.Installing the hldsupdatetool.[/B] To download hldsupdatetool go to [url]http://www.steampowered.com/download/hldsupdatetool.exe[/url] and it will download directly. Make a folder on your C:\ disc and install it there. Ok, so now go to Start-->Run-->write here cmd.A black window will open. Once the window is open type in it: [QUOTE]cd C:\srcds[/QUOTE] And then [QUOTE]hldsupdatetool[/QUOTE] Press enter and wait for it to finish...It is gonna take like 4-5 minutes or something. [B]Attention:[/B]It is not going to say that it is finished, it just will stop doing anything! When it finish press anter and you will see [QUOTE]C:\srcds>[/QUOTE] So now hldsupdatetool is installed!Congratz!Ok, now do not close the CMD window and lets proceed to the next step! [B]2.Installing DarkRP,Garry's Mod and Counter Strike Source files![/B] Go to the CMD window(I hope you didn't close it) and type: [QUOTE]hldsupdatetool -command update -game garrysmod -dir C:\srcds[/QUOTE] Wait for it to end and type [QUOTE]hldsupdatetool -command update -game "Counter-Strike Source" -dir C:\srcds[/QUOTE] So they are going to take a while.Go ahead and make a cup of coffe :) . Kay, now go to [url]http://tortoisesvn.net/[/url] go to downloads and download SVN. So now go to: "C:\srcds\orangebox\garrysmod\addons".Inside it crate a new folder named "Simple RP Prop Protection".Right click it and select "SVN Checkout..." then in "URL of repository" enter this: [QUOTE][url]http://darkrp.googlecode.com/svn/trunk/Simple[/url] RP Prop Protection[/QUOTE] Wait to finish.When finished it will say something like "Completed At revision: #" So now go "C:\srcds\orangebox\garrysmod\gamemodes" and create one more folder named "DarkRP".Right click on it and do again "SVN Checkout...".In "URL of repository" enter this : [QUOTE][url]http://darkrp.googlecode.com/svn/trunk/DarkRP[/url][/QUOTE] DarkRP is installed sir!Lets proceed to step 3! [B]3.Server and autoexec cfgs.[/B] Ok, server is nearly ready!Go to "C:\srcds\orangebox\garrysmod\cfg" and edit "autoexec.cfg" with notepad ++. There enter this line [QUOTE]sv_defaultgamemode DarkRP[/QUOTE] When the server starts the default gamemode will be DarkRP, thats why we added it there :D . Now open the "server.cfg" and add: [QUOTE]hostname "ServerName" sv_defaultgamemode "DarkRP" rcon_password "RconPassword" sbox_noclip "0" sbox_godmode "0" sbox_plpldamage "0" rp_toolgun "1" sbox_maxprops "250" sbox_maxragdolls "0" sbox_maxeffects "0" sbox_maxdynamite "0" sbox_maxlamps "5" sbox_maxthrusters "1" sbox_maxwheels "2" sbox_maxhoverballs "0" sbox_maxvehicles "0" sbox_maxbuttons "30" sbox_maxemitters "0" sbox_maxspawners "0" sbox_maxturrets "0" [/QUOTE] Ok.No go to desktop and create a shortcut.Go to properties and in box type [QUOTE]C:\srcds\orangebox\srcds.exe -console -game garrysmod +map &&&& +maxplayers &&&& -autoupdate[/QUOTE] [B]NOTE:[/B]Replace the &&&& with whatever you want. [B]Last thing:[/B] You have to port forward to allow others to join! [B][I][U]Part 2.Scripting[/U][/I][/B] Lets start! [B]Jobs:[/B] The jobs file is located at: "/gmod/orangebox/garrysmod/gamemodes/DarkRP/gamemode/shared.lua". The job should be like this: [QUOTE]TEAM_TEAM1 = AddExtraTeam("Job Name Here", { color = Color(25, 25, 25, 255), model = "model of the job here", description = [[Description of the job here.]], weapons = {What weapons he has like weapon_bugbait}, command = "the command the players do to become like /blackmarketdealer", max = 3, salary = 60, admin = 0, vote = false, hasLicense = false, })[/QUOTE] [B]Addons:[/B] All addons have to be located at "/gmod/orangebox/garrysmod/addons". [B]Entities:[/B] For adding new entities on the F4 menu go to "/gmod/orangebox/garrysmod/gamemodes/DarkRP/gamemode/addentities.lua". Open it. It should look like this [QUOTE]AddEntity("Entitie name here", { ent = "entitie like money_printer", model = "Entitie model", price = 400, max = 3, cmd = "comand like /buydruglab", allowed = {Who is allowed to buy like(Put nothing for everyone)) TEAM_GANG,} })[/QUOTE] [B]Shipments:[/B] In "/gmod/orangebox/garrysmod/gamemodes/DarkRP/gamemode/addentities.lua" again! It should look like [QUOTE]AddCustomShipment("Name of the shipment", { model = "model", entity = "Entitie name like weapon_pumpshotgun2", price = 1750, amount = 10, seperate = false, pricesep = nil, noship = false, allowed = {TEAM_GUN} })[/QUOTE] This is all.If you want anything more write a comment :D .
[quote]Part 2.Scripting[/quote] This isn't real scripting, it's just adding new tables. But I agree, this is quite useful for complete noobs.
Yeah <3
Why are you using this as SVN link? [url]http://darkrp.googlecode.com/svn/trunk/DarkRP[/url] It's the wrong link. [url]https://github.com/FPtje/DarkRP[/url]
BITCH PLEASE, we already got this thread. [url]http://facepunch.com/showthread.php?t=669841[/url]
[QUOTE=SweetTea;40370455]BITCH PLEASE, we already got this thread. [url]http://facepunch.com/showthread.php?t=669841[/url][/QUOTE] That one is really outdated.
Sorry, you need to Log In to post a reply to this thread.