How to add 2 custom checks on DarkRP jobs?

So this is my code,


TEAM_VIPMETH = DarkRP.createJob("VIP Meth Cook", { -- Name
    color = Color(238, 99, 99, 255), -- Team color
    model = "models/player/hostage/hostage_01.mdl", -- Player model
    description = [[Cook Meth, and sell it to the Meth Dealer.]],  -- Job description
    weapons = {"m9k_fists"}, -- Additional weapons
    command = "VIPmeth", -- Command to become the job
    max = 0, -- Maximum amount of said job
    salary = 200, -- Salary
    admin = 0, -- Requires Admin? 1 for yes, 0 for no.
    vote = false, -- Do they need to vote? true for yes, false for no.
    hasLicense = false, -- Has a license
    customCheck = function(ply) return ply:GetNWString("usergroup") == "donator" or ply:IsAdmin()  end, -- The extra check function. Enter nil or nothing to not have a restriction
    CustomCheckFailMsg = "This job is VIP only!" -- Allows you to tell the user what went wrong when attempting to switch jobs
})

I’m trying to add 2 custom checks for the donator rank, because basically a mod of mine donated but I’m unable to give 2 groups. That’s why I made a new group but I’m wondering how can I add another custom check to this job? would it be == “donator”, “anothergroup” ?

Try something like this.



local UserGroups = {"vip", "admin", "superadmin"}
customCheck = function(ply) return table.HasValue(UserGroups, ply:GetUserGroup())  end,


Should there be a comma at the end of local UserGroups = {“vip”, “admin”, “superadmin”}?

Don’t put the table inside your job, put it at the top of the jobs file or something.

Ah…
I actually googled your code thinking maybe there would be something similar, and I found this.
http://forum.facepunch.com/showthread.php?t=1418458

Seems more efficient for me, as it would be easier in the future if I wanted to add more jobs.
Thanks for the help anyways!