• Job for admins not working
    2 replies, posted
how would I make this for my staff but it does not work please help TEAM_SADMIN = DarkRP.createJob("Staff on duty", {    color = Color(150, 20, 20, 255),    model = "models/player/anon/anon.mdl",    description = [[]],    weapons = {},    command = "saod",    max = 0,    salary = 100,    admin = 0,    vote = false,    hasLicense = false,    category = "Admins",    customCheck = function(ply) return ply:GetUserGroup() == "superadmin", "Owner", "staff in training", "Moderator", "Staff Manager", "Community Manager", "Co-Owner", "Overseer", "admin" end, })
Replace “,” With “or” ply:GetUserGroup() == "superadmin" or "Owner" or "staff in training"or"Moderator"or"Staff Manager"or"Community Manager"or"Co-Owner"or"Overseer"or"admin" end, })
To make it look better, if you don't care about adding more lines, add this at the top of the code: local allowedGroups = { "superadmin", "Owner", "staff in training", "Moderator", "Staff Manager",     "Community Manager",     "Co-Owner",      "Overseer",      "admin", } and for the customCheck use this: customCheck = function(ply) return table.HasValue(allowedGroups,ply:GetUserGroup()) end, That should work
Sorry, you need to Log In to post a reply to this thread.