DarkRP-Config

From GMod Wiki

Jump to: navigation, search
Deletion.pngThis page has been nominated for deletion. Deletion is due within approximately 30 days from nomination, unless the deletion has been disputed on the talk page. See more pages nominated for deletion here.
Reason for deletion: Not what Garry wants the wiki to be used for
Last Edit was made on 11/16/2011


DarkRP: Class Creation
Page white text.png Description:Configuring DarkRP.
link=User:Mr. Phy Original Author:Mr. Phy
Calendar.png Created:December 20, 2009


Class Making

Simple Class Making

To make an extra class script this and put in shared.lua:

AddExtraTeam( "<NAME OF THE CLASS>", Color(<red>, <Green>, <blue>, 255), "<Player model>" , [[<the description(it can have enters)>]], { "<first extra weapon>","<second extra weapon>", etc...}, "<chat command to become it(WITHOUT THE /!)>", <maximum amount of this team> <the salary he gets>, 0/1/2 = public /admin only / superadmin only, <1/0/true/false Do you have to vote to become it>,  true/false DOES THIS TEAM HAVE A GUN LICENSE?, TEAM: Which team you need to be to become this team)

A example is here: it's the Hobo:

--VAR without /!!!       The name   the color(what you see in tab)    the player model		      The description
TEAM_HOBO = AddExtraTeam("Hobo",    Color(80, 45, 0, 255),            "models/player/corpse1.mdl",    [[The lowest member of society. All people see you laugh. 
You have no home.
Beg for your food and money
Sing for everyone who passes to get money
Make your own wooden home somewhere in a corner or 
outside someone else's door]], {"weapon_bugbait"}, "hobo",                   5,                   0,                                               0,                                  false)
//                             No extra weapons    say /hobo to become hobo  Maximum hobo's = 5	  his salary = 0 because hobo's don't earn money.  0 = everyone can become hobo ,      false = you don't have to vote to become hobo
// MAKE SURE THAT THERE IS NO / IN THE TEAM NAME OR IN THE TEAM COMMAND:
// TEAM_/DUDE IS WROOOOOONG !!!!!!
// HAVING "/dude" IN THE COMMAND FIELD IS WROOOOOOOONG!!!!

Map Specific Class Making

Map specific class making is like making a normal class. However, it will only show up if the server is running a specific map. So if I was running rp_oviscity on a server a class that uses a feature of the said map is available. Here is a example:

 
if ( string.find( string.lower( game.GetMap() ), "rp_oviscity_b4" or "rp_oviscity_gmc4" ) ) then
TEAM_JUDGE = AddExtraTeam("Judge", Color(150, 150, 150, 255), "models/player/magnusson.mdl", [[The Judge decides who is punished or who isn't.
Make your punishments fair, and decide based on evidence, and not for personal reasons.]], {}, "judge", 1, 75, 0, true, false)
end

By putting this in shared.lua a judge class will be available if you run rp_oviscity_b4 or rp_oviscity_gmc4.

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox