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.

Having some trouble with jobs, groupchat, and door groups

Discussion in 'DarkRP Modding Questions & Help' started by [QG]CrusherFTW, Sep 5, 2019.

  1. [QG]CrusherFTW

    [QG]CrusherFTW New Member

    Problem #1
    So i am helping in making a Dark RP server rn and one of the problems that is making me go nuts is the Staff Jobs, i made a category for the staff jobs, which should work but isnt working, The staff jobs work fine and what not its just that the server is blind on not seeing the category for staff job the same goes for the gun dealer category. Here is the coding for the staff jobs, staff category, gun dealer jobs, and gun dealer category

    Staff Jobs:
    Code (CSS):
    TEAM_ADMIN = DarkRP.createJob("Admin On Duty", {
        color = Color(0, 0, 0, 255),
        model = {"models/player/combine_super_soldier.mdl"},
        description = [[Admin's that are going to be on Duty must be on this job at all times!]],
        command = "admin",
        max = 0,
        salary = 55,
        admin = 0,
        vote = false,
        hasLicense = true,
        candemote = false,
        category = "Staff",
    })

    TEAM_MODERATOR = DarkRP.createJob("Moderator On Duty", {
        color = Color(0, 0, 0, 255),
        model = {"models/player/combine_super_soldier.mdl"},
        description = [[Moderator'
    s that are going to be on Duty must be on this job at all times!]],
        command = "moderator",
        max = 0,
        salary = 55,
        admin = 0,
        vote = false,
        hasLicense = true,
        candemote = false,
        category = "Staff",
    })

    TEAM_SADMIN = DarkRP.createJob("Superadmin On Duty", {
        color = Color(0, 0, 0, 255),
        model = {"models/player/combine_super_soldier.mdl"},
        description = [[Any high up's that are going to be on Duty must be on this job at all times!]],
        command = "sadmin",
        max = 0,
        salary = 55,
        admin = 0,
        vote = false,
        hasLicense = true,
        candemote = false,
        category = "Staff",
    })
    DarkRP.createCategory{
        name = "Staff",
        categorises = "jobs",
        startExpanded = true,
        color = Color(0, 0, 0, 255),
        canSee = function(ply) return table.HasValue({"superadmin", "admin", "Moderator", "T-Mod", "Moderator", "T-Admin", "Developer", "Owner", "Co-Owner", "Server-Manager", "Community-Manager"}, ply:GetNWString("usergroup")) end,
        sortOrder = 105
    }
    Screenshot of errors:
    [​IMG]
    Gun Dealers:
    Code (CSS):
    DarkRP.createCategory{
        name = "Gun Dealers",
        categorises = "jobs",
        startExpanded = true,
        color = Color(255, 165, 0, 255),
        canSee = function(ply) return true end,
        sortOrder = 103,
    }
    TEAM_GUN = DarkRP.createJob("Gun Dealer", {
        color = Color(255, 140, 0, 255),
        model = "models/player/monk.mdl",
        description = [[A Gun Dealer is the only person who can sell guns to other people.
            Make sure you aren't caught selling illegal firearms to the public! You might get arrested!]],
        weapons = {},
        command = "gundealer",
        max = 2,
        salary = GAMEMODE.Config.normalsalary,
        admin = 0,
        vote = true,
        hasLicense = false,
        category = "Gun Dealers",
    })

    TEAM_VIPGUN = DarkRP.createJob("Pro Gun Dealer", {
        color = Color(255, 140, 0, 255),
        model = "models/player/monk.mdl",
        description = [[A VIP Gun Dealer is the person that can sell more weaposn than a regular gun dealer.
            Make sure you aren'
    t caught selling illegal firearms to the public! You might get arrested!]],
        weapons = {},
        command = "vipgundealer",
        max = 2,
        salary = GAMEMODE.Config.normalsalary,
        admin = 0,
        vote = true,
        hasLicense = false,
        category = "Gun Dealers",
        customCheck = function(ply) return CLIENT or
            table.HasValue({"Bronze-VIP", "Silver-VIP", "Diamond-VIP", "T-Mod", "Moderator", "T-Admin", "admin", "superadmin", "Developer", "Community-Manager", "Co-Owner", "Owner", "Server-Manager"}, ply:GetNWString("usergroup"))
        end,
        CustomCheckFailMsg = "This Job is for VIP+! If you want to become a Pro Gun Dealer donate on the forums to get this!",
    })
    Screenshot of the errors:
    [​IMG]

    Oh and another job isnt being placed in a category that is working fine, i made a custom job named Banker to go into the Citizen's Category and not civil protection.
    Code (Text):
    TEAM_BANK = DarkRP.createJob("Banker", {
        color = Color(25, 25, 170, 255),
        model = {"models/player/Group01/Male_09.mdl"},
        description = [[The person that gives/takes money away from people.
            Can defend the bank if the banker wants to with their gun.
            Must call 911 when the bank is being robbed.
            Bash a player with a stunstick and they may learn to obey the law.
            Can use the Weapon Checker to check people for any kind of weapons.]],
        weapons = {"weapon_glock2", "stunstick", "weaponchecker"},
        command = "banker",
        max = 4,
        salary = GAMEMODE.Config.normalsalary * 1.45,
        admin = 0,
        vote = true,
        hasLicense = true,
        ammo = {
            ["pistol"] = 60,
        },
        category = "Citizen ",
    })
    Screenshot:
    [​IMG]

    Problem #2
    The next problem is group chat, I made a couple new Civil protection jobs and i want them to be in the same group chat as Chief, Police, and Mayor, so i made a new groupchat(yes i disabled the default group chat) with all of Swat, Police, and Mayor to use but when someone joins the server they get an lua error and i dont know why that is happening, in the coding its fine but the server is acting like its drunk....
    Evidence of LUA Error:
    [​IMG]
    [​IMG]
    Coding of groupchat:
    Code (CSS):
    DarkRP.createEntityGroup("Law Enforcements", TEAM_POLICE, TEAM_CHIEF, TEAM_MAYOR, TEAM_SWAT, TEAM_SWATCHIEF, TEAM_SWAT, TEAM_SWAT, TEAM_SWATSNIPER, TEAM_SWATJUGGERNAUGHT)
    The coding may look different cause i used a site to make the group chat.

    Problem #3
    And finally the last problem, Doorgroups(my personal hell). After adding swat jobs, i want to make it where they can also open doors at the Police Station just like the Chief, Police, and Mayor, buut when i made the doorgroup(i also used a site to make the doorgroup for all Civil Protection Jobs...and I did disable the default door group for cops and mayor only) it doesnt show up at all
    Coding of doorgroup:
    Code (Text):
    DarkRP.createEntityGroup("Law Enforcements", TEAM_POLICE, TEAM_CHIEF, TEAM_MAYOR, TEAM_SWAT, TEAM_SWATCHIEF, TEAM_SWAT, TEAM_SWAT, TEAM_SWATSNIPER, TEAM_SWATJUGGERNAUGHT)
    Evidence of no doorgroup being shown up
    [​IMG]

    so ya, if anyone can help me please do cause i have been trying to solve this problem on my own for the past week and i would like some fresh inputs than my own cause really all i do is agree/disagree with everything that comes to coding alone w/o help.
     

Share This Page