1. 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.

Help me pls jobs dont work

Discussion in 'DarkRP Modding Questions & Help' started by vwitem, Sep 4, 2017.

  1. vwitem

    vwitem New Member

    ive createt new jobs like Staff on duty but it dont work i made it with TCB = TheCodingBeasts
    i need help do you guys know about that
    --- Double Post Merged, Sep 4, 2017 ---
    --[[
    Generated using: DarkRP | Job Generator
    https://csite.io/tools/gmod-darkrp-job
    --]]
    TEAM_CITIZEN = DarkRP.createJob("Staff on duty", {
    color = Color(0, 0, 0, 255),
    model = {"models/player/combine_super_soldier.mdl"},
    description = [[Staff on duty.]],
    weapons = {"csgo_m9_marblefade", "m9k_spas12", "weapon_undertale_sans_admin", "weapon_undertale_sans_admin", "m9k_minigun"},
    command = "Staff",
    max = 0,
    salary = 0,
    admin = 1,
    vote = false,
    hasLicense = true,
    candemote = false,
    category = "Staff On Duty"
    })

    whoops createt to early
     
  2. FireWolf

    FireWolf New Member

    That will work. From what you have supplied, I don't see a problem.
     
  3. Encrypted Genesis

    Encrypted Genesis New Member

    Code (Text):

    // -Right here -
    TEAM_STAFFONDUTY = DarkRP.createJob("Staff on duty", {
    color = Color(0, 0, 0, 255),
    model = {"models/player/combine_super_soldier.mdl"},
    description = [[Staff on duty.]],
    weapons = {""},
    command = "Staff",
    max = 0,
    salary = 0,
    admin = 1,
    vote = false,
    hasLicense = true,
    candemote = false,
    category = "Staff On Duty"
    })
     
    You gave it the same name as citizen (see comment). For the love of darkrp, please do not give your admins the biggest weapons possible. That is only going to cause more trouble.
     
    FireWolf and Sir Klutch like this.
  4. vwitem

    vwitem New Member

    But it dont pop up in the f4 menu
    --- Double Post Merged, Sep 5, 2017 ---
    But is doesnt work for me
     
    Last edited: Sep 5, 2017
  5. FireWolf

    FireWolf New Member

    Code (Text):

    TEAM_ADMIN = DarkRP.createJob("Admin On Duty", {
        color = Color( 0,  0,  0,  255 ),
        model = "models/player/combine_super_soldier.mdl",
        description = [[Stop rulebreakers]],
        weapons = {},
        command = "admin",
        max = 0,
        salary = 0,
        admin = 1,
        category = "Admins",
        PlayerLoadout = function(ply)
     ply:GodEnable()
    end,
    })
     
    This will work. You will need to change it obviously.
     
  6. Sir Klutch

    Sir Klutch Active Member

    Give this a try.
    Code (Lua):

    TEAM_STAFFONDUTY = DarkRP.createJob("Staff on duty", {
        color = Color(0, 0, 0, 255),
        model = {"models/player/combine_super_soldier.mdl"},
        description = [[Staff on duty.]],
        weapons = {}, -- I think if you leave an empty string, it'll cause the job to not show up. You had weapons = {""}
        command = "Staff",
        max = 0,
        salary = 0,
        admin = 1,
        vote = false,
        hasLicense = true,
        candemote = false,
        category = "Staff On Duty"
    })
     
    If you still have the same issue with the above job, try this;
    Code (Lua):

    TEAM_STAFFONDUTY = DarkRP.createJob("Staff on duty", {
        color = Color(0, 0, 0, 255),
        model = {"models/player/combine_super_soldier.mdl"},
        description = [[Staff on duty.]],
        weapons = {},
        command = "Staff",
        max = 0,
        salary = 0,
        admin = 1,
        vote = false,
        hasLicense = true,
        candemote = false,
        category = "Staff On Duty",
        customCheck = function()
            return CLIENT
        end
    })
     
     
  7. [HGN] Rainbow

    [HGN] Rainbow New Member

    You don't need the open and closed brackets if you're only supplying 1 model.

    Code (Text):

    TEAM_STAFFONDUTY = DarkRP.createJob("Staff on duty", {
        color = Color(0, 0, 0, 255),
        model = "models/player/combine_super_soldier.mdl",
        description = [[Staff on duty.]],
        weapons = {},
        command = "Staff",
        max = 0,
        salary = 0,
        admin = 1,
        vote = false,
        hasLicense = true,
        candemote = false,
        category = "Staff On Duty",  
       customCheck = function(ply) return CLIENT or  table.HasValue({"admin",superadmin" }, ply:GetNWString("usergroup")) end,
        CustomCheckFailMsg = "This job is for Staff only!",
    })
     
    To add more usergroups see below.
    Code (Text):

    For example

    ({"assistant", "Trial Moderator", "Moderator", "Moderator+", "Head Moderator", "Admin", "Admin+", "Head Admin", "superadmin", "owner"}, ply:GetNWString("usergroup")) end,
        CustomCheckFailMsg = "This job is for Staff only!",
     
    Only users set to the usergroups you add can join that job. If not, it will provide a fail message.
     
  8. vwitem

    vwitem New Member

    I dont know why but it doesnt work at all
     
  9. Sir Klutch

    Sir Klutch Active Member

    Have you tried;
    Code (Lua):

    TEAM_STAFFONDUTY = DarkRP.createJob("Staff on duty", {
        color = Color(0, 0, 0, 255),
        model = {"models/player/combine_super_soldier.mdl"},
        description = [[Staff on duty.]],
        weapons = {},
        command = "Staff",
        max = 0,
        salary = 0,
        admin = 1,
        vote = false,
        hasLicense = true,
        candemote = false,
        category = "Staff On Duty",
        customCheck = function()
            return CLIENT
        end
    })
     
    @vwitem

    And what f4 menu are you using?
     
  10. thewazzup908

    thewazzup908 New Member

    Your category is set to "category = "Staff On Duty", did you even make this category yet? If not it won't work
     
  11. Sir Klutch

    Sir Klutch Active Member

    It would also throw an error saying the category does not exist. I assume if there was an error, he would inform us of said error. At least I would hope anyway.
     
  12. Encrypted Genesis

    Encrypted Genesis New Member

    It's a category problem. Add this category to your categories.lua

    Code (Text):
    DarkRP.createCategory{
        name = "Staff On Duty",
        categorises = "jobs",
        startExpanded = true,
        color = Color(255, 215, 0, 255),
        canSee = function(ply) return ply:IsAdmin() end,
        sortOrder = 105,
    }
     

Share This Page