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.

Can't switch to custom jobs.

Discussion in 'DarkRP Modding Questions & Help' started by MrMarooca, Feb 26, 2015.

  1. MrMarooca

    MrMarooca New Member

    Okay, so I've been using the DarkRP mod tool to create custom jobs and all that fun stuff, but once I'm in game and select the job I want from the F4 menu, it doesn't actually switch me to that job, it simply says in the chat the command of the job, like this:

    Uername: /police

    I apologize for using a phone for these pictures, I'm on my brand new PC and I currently have no way to screenshot the game (at least not while using the F4 server).

    [​IMG]

    [​IMG]


    Here's my code for the custom jobs:

    Code (Text):
    TEAM_CITIZEN = DarkRP.createJob("Citizen",
    {
        color = Color(43, 255, 0, 255),
        model = {
            "models/player/Group01/female_01.mdl",
            "models/player/Group01/female_02.mdl",
            "models/player/Group01/female_03.mdl",
            "models/player/Group01/female_04.mdl",
            "models/player/Group01/female_05.mdl",
            "models/player/Group01/female_06.mdl",
            "models/player/Group01/male_01.mdl",
            "models/player/Group01/male_02.mdl",
            "models/player/Group01/male_03.mdl",
            "models/player/Group01/male_04.mdl",
            "models/player/Group01/male_05.mdl",
            "models/player/Group01/male_06.mdl",
            "models/player/Group01/male_07.mdl",
            "models/player/Group01/male_08.mdl",
            "models/player/Group01/male_09.mdl"
            },
        description = [[Citizens make up the base of society. You may not raid, mug, or sdteal from others. Use this class if you plan on only building or basing.
       
        RAID = NO
        MUG = NO
        STEAL = NO]],
        weapons = {"keys", "weapon_physcannon", "gmod_camera", "gmod_tool", "pocket", "weapon_physgun"},
        command = "citizen",
        max = 0, -- at most 70% of the players can have this job. Set to a whole number to set an absolute limit.
        salary = 75,
        admin = 0,
        vote = false,
        hasLicense = false,
        modelScale = 1.0,
        maxpocket = 10,
        maps = {"rp_downtown_v2", "gm_construct"},
        candemote = false,
        mayor = false,
        chief = false,
        medic = false,
        cook = false,
        hobo = false
    })

    TEAM_POLICE = DarkRP.createJob("Police Officer",
    {
        color = Color(0, 89, 255, 255),
        model = {
            "models/player/nypd/male_02.mdl",
            "models/player/nypd/male_04.mdl",
            "models/player/nypd/male_05.mdl",
            "models/player/nypd/male_06.mdl",
            "models/player/nypd/male_07.mdl",
            "models/player/nypd/male_08.mdl",
            "models/player/nypd/male_09.mdl"
            },
        description = [[Police officers keep society controlled and help ensure the safety of others. Enforce the mayor's laws, but don't abuse this job's powers, or you could be banned.
        Hit a player with your arrest/unarrest stick to send them to jail or unjail them.
       
        RAID = YES (With a warrant.)
        MUG = NO
        STEAL = NO]],
        weapons = {"m9k_usp", "arrest_stick", "unarrest_stick", "stunstick", "weaponchecker", "door_ram"},
        command = "police",
        max = 7, -- at most 70% of the players can have this job. Set to a whole number to set an absolute limit.
        salary = 125,
        admin = 0,
        vote = true,
        hasLicense = true,
        modelScale = 1.0,
        maxpocket = 10,
        maps = {"rp_downtown_v2", "gm_construct"},
        candemote = true,
        mayor = false,
        chief = false,
        medic = false,
        cook = false,
        hobo = false
    })

    TEAM_POLICECHIEF = DarkRP.createJob("Police Chief",
    {
        color = Color(0, 89, 255, 255),
        model = {
            "models/player/elispolice/police.mdl"
            },
        description = [[The police chief has the same roles as basic police units, only he gets to control them.
        If you are a police officer you must follow the chief's orders.
        Hit a player with your arrest/unarrest stick to send them to jail or unjail them.
       
        RAID = YES (With a warrant.)
        MUG = NO
        STEAL = NO]],
        weapons = {"m9k_deagle", "arrest_stick", "unarrest_stick", "stunstick", "weaponchecker", "door_ram"},
        command = "policechief",
        max = 1, -- at most 70% of the players can have this job. Set to a whole number to set an absolute limit.
        salary = 175,
        admin = 0,
        vote = true,
        hasLicense = true,
        modelScale = 1.0,
        maxpocket = 10,
        maps = {"rp_downtown_v2", "gm_construct"},
        candemote = true,
        mayor = false,
        chief = true,
        medic = false,
        cook = false,
        hobo = false
    })

    TEAM_SECRETSERVICE = DarkRP.createJob("Secret Service",
    {
        color = Color(255, 0, 0, 255),
        model = {
            "models/player/suits/male_07_open.mdl"
            },
        description = [[The secret service are the mayor's defence. Do whatever it takes to keep him alive, even if it means taking a bullet.
        Going against the mayor's commands could get you fired.
       
        RAID = NO
        MUG = NO
        STEAL = NO]],
        weapons = {"stunstick", "weaponchecker", "m9k_m92beretta"},
        command = "ss",
        max = 2, -- at most 70% of the players can have this job. Set to a whole number to set an absolute limit.
        salary = 150,
        admin = 0,
        vote = true,
        hasLicense = true,
        modelScale = 1.0,
        maxpocket = 10,
        maps = {"rp_downtown_v2", "gm_construct"},
        candemote = true,
        mayor = false,
        chief = false,
        medic = false,
        cook = false,
        hobo = false
    })

    TEAM_MAYOR = DarkRP.createJob("Mayor",
    {
        color = Color(255, 0, 0, 255),
        model = {
            "models/player/breen.mdl"
            },
        description = [[The mayor controls all of socety. Set laws for your police officers to enforce, approve warrants and start lotteries to keep your citizens happy.
        You may command your Secret Service agents to protect you and follow you around.
       
        RAID = NO
        MUG = NO
        STEAL = NO]],
        weapons = {"unarrest_stick"},
        command = "mayor",
        max = 1, -- at most 70% of the players can have this job. Set to a whole number to set an absolute limit.
        salary = 200,
        admin = 0,
        vote = false,
        hasLicense = false,
        modelScale = 1.0,
        maxpocket = 10,
        maps = {"rp_downtown_v2", "gm_construct"},
        candemote = false,
        mayor = true,
        chief = false,
        medic = false,
        cook = false,
        hobo = false
    })

    TEAM_STAFF = DarkRP.createJob("Staff On Duty",
    {
        color = Color(219, 46, 46, 255),
        model = {
            "models/player/group03/male_01.mdl",
            "models/player/group03/male_02.mdl",
            "models/player/group03/male_03.mdl",
            "models/player/group03/male_04.mdl",
            "models/player/group03/male_05.mdl",
            "models/player/group01/male_06.mdl"
            },
        description = [[Anyone seen using this job is MonixRP staff. Staff, please treat all players fairly and with respect.
        This is a non-roleplay  class.]],
        weapons = {"unarrest_stick"},
        command = "staff",
        max = 0, -- at most 70% of the players can have this job. Set to a whole number to set an absolute limit.
        salary = 500,
        admin = 1,
        vote = false,
        hasLicense = true,
        modelScale = 1.0,
        maxpocket = 20,
        maps = {"rp_downtown_v2", "gm_construct"},
        candemote = false,
        mayor = false,
        chief = false,
        medic = false,
        cook = false,
        hobo = false
    })
    Thanks to anyone who can provide help.
     
  2. MrMarooca

    MrMarooca New Member

    Bump.
    I really need some help and I have no idea where to go with this.

    Thanks.
     
  3. Pab14567

    Pab14567 Well-Known Member

    Okay delete everything after hasLicense
    Although I don't think it affects it, but it's a bit messier like that, and take of the weapons from the weapons field for the citizen, they already spawn with them by default
    And a error would be nice if you posted it here
     
  4. MrMarooca

    MrMarooca New Member

    Will do. Also, there are no errors - it simply doesn't change the job.
     
  5. MrMarooca

    MrMarooca New Member

    Last bump.
    Anyone ever had a problem with this?
     
  6. MrMarooca

    MrMarooca New Member

    FIXED: The map's name that my server uses wasn't in any of the job's maps array.
     

Share This Page