1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

custom Jobs not appearing

Discussion in 'DarkRP Modding Questions & Help' started by darkbytes, Aug 28, 2014.

  1. darkbytes

    darkbytes New Member

    Hello. I have a garrys mod darkrp server.

    I wish to add custom jobs to my server so I downloaded the darkrp modification file and placed it in my servers addons files as instructed by many tutorials.

    I then went to edit jobs.lua in notepad ++ and then I uploaded the new version to the server

    I then restarted the server and joined. The custom jobs have not appeared in the f4 menu.

    Here is my jobs.lua file contents

    Code (Text):
    /*---------------------------------------------------------------------------
    DarkRP custom jobs
    ---------------------------------------------------------------------------

    This file contains your custom jobs.
    This file should also contain jobs from DarkRP that you edited.

    Note: If you want to edit a default DarkRP job, first disable it in darkrp_config/disabled_defaults.lua
        Once you've done that, copy and paste the job to this file and edit it.

    The default jobs can be found here:
    https://github.com/FPtje/DarkRP/blob/master/gamemode/config/jobrelated.lua

    For examples and explanation please visit this wiki page:
    http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields


    Add jobs under the following line:
    ---------------------------------------------------------------------------*/

    ------------------------------------------------------------------
    TEAM_COMBINE SOLDIER= DarkRP.createJob('COMBINE SOLDIER'), {
    color = Color(204, 0, 51, 255, 255) ,
    model = "models/player/combine_soldier.mdl",
    description = [[You are to aid the government and protect the citizens from harm. You are a soldier of the combine over watch. Fight criminals in the city and protect the citizens.]],
    weapons = {"weapon_ar2","weapon_pistol"},
    command = 'COMBINE SOLDIER',
    max = 6,
    salary = 100,
    admin = 0,
    vote = false,
    hasLicense = true,
    prior = false,

    )}
    ------------------------------------------------------------------



    ------------------------------------------------------------------
    TEAM_COMBINE ELITE= DarkRP.createJob('COMBINE ELITE'), {
    color = Color(255, 0, 0, 255) ,
    model = "models/player/combine_super_soldier.mdl",
    description = [[You are an over watch elite soldier. The best of the combine over watch. Aid the government in the biggest battles against resistance fighters and capture criminals.]],
    weapons = {"weapon_pistol","weapon_ar2"},
    command = 'COMBINE ELITE',
    max = 2,
    salary = 50,
    admin = 0,
    vote = true,
    hasLicense = true,
    prior = false,

    )}
    ------------------------------------------------------------------



    ------------------------------------------------------------------
    TEAM_HL2 GUN DEALER= DarkRP.createJob('HL2 GUN DEALER'), {
    color = Color(255, 51, 255, 255) ,
    model = "models/player/eli.mdl",
    description = [[You are a gun dealer from city 17. Sell weapons to the public. You can open a store to sell the weapons or use /advert and meet at a place to sell them.]],
    weapons = {weapon_pistol},
    command = 'HL2 GUN DEALER',
    max = 5,
    salary = 50,
    admin = 0,
    vote = false,
    hasLicense = false,
    prior = false,

    )}
    ------------------------------------------------------------------




    /*---------------------------------------------------------------------------
    Define which team joining players spawn into and what team you change to if demoted
    ---------------------------------------------------------------------------*/
    GAMEMODE.DefaultTeam = TEAM_CITIZEN


    /*---------------------------------------------------------------------------
    Define which teams belong to civil protection
    Civil protection can set warrants, make people wanted and do some other police related things
    ---------------------------------------------------------------------------*/
    GAMEMODE.CivilProtection = {
        [TEAM_POLICE] = true,
        [TEAM_CHIEF] = true,
        [TEAM_MAYOR] = true,
    }

    /*---------------------------------------------------------------------------
    Jobs that are hitmen (enables the hitman menu)
    ---------------------------------------------------------------------------*/
    DarkRP.addHitmanTeam(TEAM_MOB)
     

    Here is my jobs.lua file.

    Darkbytes
     
    Last edited: Oct 2, 2014
  2. Jkarateking

    Jkarateking Member

    Take out the prior thing and also instead of
    command = 'bob'
    do
    command = "bob"
    See I changed the ' for "
     
  3. stapler2025

    stapler2025 Member

    Code (Text):
    TEAM_HL2GUNDEALER= DarkRP.createJob('HL2 GUN DEALER'), {
    color = Color(255, 51, 255, 255) ,
    model = "models/player/eli.mdl",
    description = [[You are a gun dealer from city 17. Sell weapons to the public. You can open a store to sell the weapons or use /advert and meet at a place to sell them.]],
    weapons = {weapon_pistol},
    command = "HL2GUNDEALER",
    max = 5,
    salary = 50,
    admin = 0,
    vote = false,
    hasLicense = false,
    prior = false,

    )}
    You can't have spaces in the TEAM_ name, etc.
     
  4. darkbytes

    darkbytes New Member

    Hello. Thank you for the replies. I have corrected the mistakes that you have told me.
    By
    1. Changing the command ' ' to " "
    2. Getting rid of the spaces in the team_name

    However the jobs are still not appearing.

    When I join the server an error is displayed in the console

    [ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:15: unexpected symbol near ')'
    1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:0


    Here is the code that I am using now in jobs.lua

    Code (Text):
    ------------------------------------------------------------------
    TEAM_COMBINESOLDIER= DarkRP.createJob('COMBINE SOLDIER'), {
    color = Color(204, 0, 51, 255, 255) ,
    model = "models/player/combine_soldier.mdl",
    description = [[You are to aid the government and protect the citizens from harm. You are a soldier of the combine over watch. Fight criminals in the city and protect the citizens.]],
    weapons = {"weapon_ar2","weapon_pistol"},
    command = "COMBINESOLDIER",
    max = 6,
    salary = 100,
    admin = 0,
    vote = false,
    hasLicense = true,
    prior = false,

    )}
    ------------------------------------------------------------------



    ------------------------------------------------------------------
    TEAM_COMBINEELITE= DarkRP.createJob('COMBINE ELITE'), {
    color = Color(255, 0, 0, 255) ,
    model = "models/player/combine_super_soldier.mdl",
    description = [[You are an over watch elite soldier. The best of the combine over watch. Aid the government in the biggest battles against resistance fighters and capture criminals.]],
    weapons = {"weapon_pistol","weapon_ar2"},
    command = "COMBINEELITE",
    max = 2,
    salary = 50,
    admin = 0,
    vote = true,
    hasLicense = true,
    prior = false,

    )}
    ------------------------------------------------------------------



    ------------------------------------------------------------------
    TEAM_HL2GUNDEALER= DarkRP.createJob('HL2 GUN DEALER'), {
    color = Color(255, 51, 255, 255) ,
    model = "models/player/eli.mdl",
    description = [[You are a gun dealer from city 17. Sell weapons to the public. You can open a store to sell the weapons or use /advert and meet at a place to sell them.]],
    weapons = {weapon_pistol},
    command = "HL2GUNDEALER",
    max = 5,
    salary = 50,
    admin = 0,
    vote = false,
    hasLicense = false,
    prior = false,

    )}
    ------------------------------------------------------------------




    /*---------------------------------------------------------------------------
    Define which team joining players spawn into and what team you change to if demoted
    ---------------------------------------------------------------------------*/
    GAMEMODE.DefaultTeam = TEAM_CITIZEN


    /*---------------------------------------------------------------------------
    Define which teams belong to civil protection
    Civil protection can set warrants, make people wanted and do some other police related things
    ---------------------------------------------------------------------------*/
    GAMEMODE.CivilProtection = {
        [TEAM_POLICE] = true,
        [TEAM_CHIEF] = true,
        [TEAM_MAYOR] = true,
    }

    /*---------------------------------------------------------------------------
    Jobs that are hitmen (enables the hitman menu)
    ---------------------------------------------------------------------------*/
    DarkRP.addHitmanTeam(TEAM_MOB)
     
    Darkbytes
     
    Last edited: Aug 29, 2014
  5. Rax

    Rax New Member

    Code (Text):
    ('COMBINE SOLDIER')
    It should look like this

    Code (Text):
    ("COMBINE SOLDIER")
    Use " never use '.
     
  6. Rax

    Rax New Member

    Correct code by using this custom job that I use for my server that works
    Code (Text):
    TEAM_CRIMINAL = DarkRP.createJob("Criminal", {
        color = Color(255, 50, 0, 255),
        model = {"models/player/pd2_dallas_p.mdl", "models/player/pd2_chains_p.mdl", "models/player/pd2_hoxton_p.mdl", "models/player/pd2_wolf_p.mdl"},
        description = [[Commit crimes without being caught by the police.
            Rules:
            1. You MUST raid with atleast one Criminal, no solo raiding.
            2. Do not kill unarmed players during a raid unless they threaten you.
            3. Max mug is $500 do "/y MUG <amount>" if you would like to mug.
            You can only mug the same person every 15 minutes.
            Tip: Buy lockpicks and keypad crackers from Black Market Dealers.
            RAID = YES. MUG = YES.]],
        weapons = {},
        command = "criminal",
        max = 6,
        salary = 50,
        admin = 0,
        vote = false,
        hasLicense = false,
     
    })
     
  7. Jkarateking

    Jkarateking Member

    i know whats wrong. change your code to this:

    ------------------------------------------------------------------
    TEAM_COMBINESOLDIER= DarkRP.createJob(£COMBINE SOLDIER", {
    color = Color(204, 0, 51, 255, 255) ,
    model = "models/player/combine_soldier.mdl",
    description = [[You are to aid the government and protect the citizens from harm. You are a soldier of the combine over watch. Fight criminals in the city and protect the citizens.]],
    weapons = {"weapon_ar2","weapon_pistol"},
    command = "COMBINESOLDIER",
    max = 6,
    salary = 100,
    admin = 0,
    vote = false,
    hasLicense = true,
    prior = false,
    )}
    ------------------------------------------------------------------
    ------------------------------------------------------------------
    TEAM_COMBINEELITE= DarkRP.createJob("COMBINE ELITE", {
    color = Color(255, 0, 0, 255) ,
    model = "models/player/combine_super_soldier.mdl",
    description = [[You are an over watch elite soldier. The best of the combine over watch. Aid the government in the biggest battles against resistance fighters and capture criminals.]],
    weapons = {"weapon_pistol","weapon_ar2"},
    command = "COMBINEELITE",
    max = 2,
    salary = 50,
    admin = 0,
    vote = true,
    hasLicense = true,
    prior = false,
    )}
    ------------------------------------------------------------------
    ------------------------------------------------------------------
    TEAM_HL2GUNDEALER= DarkRP.createJob("HL2 GUN DEALER", {
    color = Color(255, 51, 255, 255) ,
    model = "models/player/eli.mdl",
    description = [[You are a gun dealer from city 17. Sell weapons to the public. You can open a store to sell the weapons or use /advert and meet at a place to sell them.]],
    weapons = {weapon_pistol},
    command = "HL2GUNDEALER",
    max = 5,
    salary = 50,
    admin = 0,
    vote = false,
    hasLicense = false,
    prior = false,
    )}
    ------------------------------------------------------------------
    /*---------------------------------------------------------------------------
    Define which team joining players spawn into and what team you change to if demoted
    ---------------------------------------------------------------------------*/
    GAMEMODE.DefaultTeam = TEAM_CITIZEN
    /*---------------------------------------------------------------------------
    Define which teams belong to civil protection
    Civil protection can set warrants, make people wanted and do some other police related things
    ---------------------------------------------------------------------------*/
    GAMEMODE.CivilProtection = {
    [TEAM_POLICE] = true,
    [TEAM_CHIEF] = true,
    [TEAM_MAYOR] = true,
    }
    /*---------------------------------------------------------------------------
    Jobs that are hitmen (enables the hitman menu)
    ---------------------------------------------------------------------------*/
    DarkRP.addHitmanTeam(TEAM_MOB)
     
  8. Rax

    Rax New Member

    Karate it is still not properly coded, i have decided to fix the code correctly for you
    Code (Text):
    ------------------------------------------------------------------
    TEAM_COMBINESOLDIER = DarkRP.createJob("COMBINE SOLDIER", {
    color = Color(204, 0, 51, 255, 255) ,
    model = "models/player/combine_soldier.mdl",
    description = [[You are to aid the government and protect the citizens from harm. You are a soldier of the combine over watch. Fight criminals in the city and protect the citizens.]],
    weapons = {"weapon_ar2", "weapon_pistol"},
    command = "COMBINESOLDIER",
    max = 6,
    salary = 100,
    admin = 0,
    vote = false,
    hasLicense = true,
    prior = false,
    })
    ------------------------------------------------------------------
    ------------------------------------------------------------------
    TEAM_COMBINEELITE = DarkRP.createJob("COMBINE ELITE", {
    color = Color (255, 0, 0, 255) ,
    model = "models/player/combine_super_soldier.mdl",
    description = [[You are an over watch elite soldier. The best of the combine over watch. Aid the government in the biggest battles against resistance fighters and capture criminals.]],
    weapons = {"weapon_pistol","weapon_ar2"},
    command = "COMBINEELITE",
    max = 2,
    salary = 50,
    admin = 0,
    vote = true,
    hasLicense = true,
    prior = false,
    })
    ------------------------------------------------------------------
    ------------------------------------------------------------------
    TEAM_HL2GUNDEALER = DarkRP.createJob("HL2 GUN DEALER", {
    color = Color(255, 51, 255, 255),
    model = {"models/player/eli.mdl"},
    description = [[You are a gun dealer from city 17. Sell weapons to the public. You can open a store to sell the weapons or use /advert and meet at a place to sell them.]],
    weapons = {"weapon_pistol"},
    command = "HL2GUNDEALER",
    max = 5,
    salary = 50,
    admin = 0,
    vote = false,
    hasLicense = false,
    prior = false,
    })
    ------------------------------------------------------------------
    /*---------------------------------------------------------------------------
    Define which team joining players spawn into and what team you change to if demoted
    ---------------------------------------------------------------------------*/
    GAMEMODE.DefaultTeam = TEAM_CITIZEN
    /*---------------------------------------------------------------------------
    Define which teams belong to civil protection
    Civil protection can set warrants, make people wanted and do some other police related things
    ---------------------------------------------------------------------------*/
    GAMEMODE.CivilProtection = {
    [TEAM_POLICE] = true,
    [TEAM_CHIEF] = true,
    [TEAM_MAYOR] = true,
    }
    /*---------------------------------------------------------------------------
    Jobs that are hitmen (enables the hitman menu)
    ---------------------------------------------------------------------------*/
    DarkRP.addHitmanTeam(TEAM_MOB)
     
    Last edited: Aug 29, 2014
  9. darkbytes

    darkbytes New Member

    Thank you for all your help. I put the code that "rax" gave me and the jobs appear to be working. Thank you all for your help. :)
     
  10. [NWA]Ben Dover

    [NWA]Ben Dover New Member

    I put the code in that Rax said to and it still doesnt work
    Also I need a dev,I just created a server and i need serious help
    i have this error code: Couldn't include file '..\wd_config.lua' <File not found> <@lua/autorun/server/wd_init.lua <line 1>>
     
    Last edited: Jan 22, 2017
  11. _avrwhy

    _avrwhy New Member

Share This Page