DarkRP:Jobs

From Official DarkRP Wiki
Jump to: navigation, search
DarkRP: Jobs
Page white text.png Description:Adding and configuring jobs.
User.png Original Author:Shark
Table edit.png Updated:October 25, 2013

Contents


This page is available in the following languages:
Данная версия страницы, доступна на следующих языках:
Jarvis-flag 8010.png English | Russia-flag.png Русский

== Layout. ==

     TEAM_PIRATE = DarkRP.createJob("Pirate", { -- That's TEAM_PIRATE (Used for like AddCustomDoorgroup or Add to only that group to a door. Also, never use the same TEAM_)
        color = Color(80, 5, 255, 0), -- Chat / Scoreboard Color
        model = "models/player/swat.mdl", -- Model; to add multiple use  {"models/../model1.mdl","models/../model2.mld},  NOTE the extra comma after the bracket.
        description = [[Description.]], --Description for Job.
        weapons = {"med_kit"}, -- Weapons for a job. Seperate them with a "," eg: "med_kid", "armor_kit" always finish the last one without a ","
        command = "pirate", --Chat command for job. Don't use the same as another teams.
        max = 5, -- Maximum amount of players for this job.
        salary = 200, -- The salary they get paid.
        admin = 0, -- Requires Admin? 1 for yes, 0 for no.
        vote = true, -- Do they need to vote? true for yes, false for no.
        hasLicense = true, -- Do they have a license for weapons?
     })


== Swat Layout. ==

     TEAM_SWAT = DarkRP.createJob("S.W.A.T", {
        color = Color(80, 45, 0, 255),
        model = "models/player/swat.mdl",
        description = [[This is a donator special job,
                your duty is to heal on of your
                wounded operatives. You should stay in the PD
                until backup is needed.
                Do everything you can to keep the city safe.
                You can heal your team, but it's not optinal unless theres
                no medics alive. If theres no mayor, you'
re in charge.]],
        weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "weapon_ak472", "ls_sniper", "weapon_m42", "weapon_mp52", "stunstick", "door_ram", "weaponchecker"},
        command = "swat",
        max = 1,
        salary = 200,
        admin = 0,
        vote = true,
        hasLicense = true,
     })


== Explanation / Help. ==

TEAM_SWAT = The Lua variable for this team. This is used for things such as buying shipments, buying weapons, and if you have to be a job to become this.

AddExtraTeam("S.W.A.T", = S.W.A.T is the job name displayed in the scoreboard and the bottom left hand corner.

color = Color(0,0,153,255), = This is the colour displayed in the scoreboard, and is done in RGB format. You can find the perfect colour using the in-game colour tool.

model = "models/player/barney.mdl", = The player model that you are when you spawn as this team. If the client does not have this model, then an ERROR will be displayed.

NOTE: As of revision 529, you can add multiple models for each job, when a player chooses their job from the F4 menu, a GUI will appear with all the possible models for that class. To add more than 1 model, you list the models in {}, seperated by commas, eg: {"models/player/barney.mdl","models/player/alyx.mdl"} NOTE: Making a multiple model job may not work for some people.

description = [[Raid And Protect From Terrorists]], = The description of the class which is shown in the F4 menu. Although this feature is rarely used, it is still helpful.

weapons = {"weapon_deagle2", "weapon_mp52", "weapon_pumpshotgun2"}, = The weapons this team spawns with. You must use the weapon's entity name or this will not work.

"swat", = The command to become this team. (Ensure that you exclude the forward slash (/) as DarkRP will do so automatically)

max = 3, = How many people can be this team at one point in time?

salary = 300, = Their salary that they earn on payday.

admin = 0, = Who may become this team? (0 = anyone, 1 = admin, 2 = superadmin only)

vote = true, = Do you have to be voted into this team? (false = no and true = yes)

hasLicense = true, = Does this team have a gun license? (false = no and true = yes)


== Examples ==

     TEAM_DRUG = DarkRP.createJob("Drug Dealer", {
        color = Color(80, 45, 0, 255),
        model = "models/Eli.mdl",
        description = [[You're a drug dealer. You sell anonymous drugs. doing /advert
                will be instant demotion]],
        weapons = {},
        command = "drug",
        max = 3,
        salary = 15,
        admin = 0,
        vote = false,
        hasLicense = false
     })


     TEAM_SWAT = DarkRP.createJob("S.W.A.T", {
        color = Color(80, 45, 0, 255),
        model = "models/player/swat.mdl",
        description = [[This is a donator special job,
                your duty is to heal on of your
                wounded operatives. You should stay in the PD
                until backup is needed.
                Do everything you can to keep the city safe.]],
        weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "weapon_ak472", "ls_sniper", "weapon_m42", "weapon_mp52", "stunstick", "door_ram", "weaponchecker"},
        command = "swat",
        max = 3,
        salary = 100,
        admin = 0,
        vote = true,
        hasLicense = true,

     })


     TEAM_SWATM = DarkRP.createJob("S.W.A.T Medic", {
        color = Color(80, 45, 0, 255),
        model = "models/player/swat.mdl",
        description = [[This is a donator special job,
                your duty is to heal on of your
                wounded operatives. You should stay in the PD
                until backup is needed.
                Do everything you can to keep the city safe.
                You also keep your team healed.]],
        weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "weapon_ak472", "ls_sniper", "weapon_m42", "weapon_mp52", "stunstick", "door_ram", "weaponchecker", "med_kit"},
        command = "swatm",
        max = 3,
        salary = 100,
        admin = 0,
        vote = true,
        hasLicense = true,

     })


     TEAM_SWATC = DarkRP.createJob("S.W.A.T Cheif", {
        color = Color(80, 45, 0, 255),
        model = "models/player/swat.mdl",
        description = [[This is a donator special job,
                your duty is to heal on of your
                wounded operatives. You should stay in the PD
                until backup is needed.
                Do everything you can to keep the city safe.
                You can heal your team, but it's not optinal unless theres
                no medics alive. If theres no mayor, you'
re in charge.]],
        weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "weapon_ak472", "ls_sniper", "weapon_m42", "weapon_mp52", "stunstick", "door_ram", "weaponchecker", "med_kit"},
        command = "swat",
        max = 1,
        salary = 200,
        admin = 0,
        vote = true,
        hasLicense = true,
     })


How to make Donator Jobs

See here.

Credits

http://steamcommunity.com/profiles/76561197994824695/ Writing this tutorial.

http://steamcommunity.com/id/shanet/ Giving me the Donator Only Job Code.

http://steamcommunity.com/id/RalphORama/ Cleaning up the page, adding syntax.

http://steamcommunity.com/id/nearbyplayer/ Making edits for the new update[DarkRP 2.5]

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox
Partners