why does this code not work (DARKRP)

[lua]customCheck = function(ply) return table.HasValue({“Donator”, “VIP”, “VIP+”, “DonerAdmin”, “superadmin”, “DonerMod”, “Coder”, “Owner”}, ply:GetNWString(“usergroup”)) end
[/lua]

the job works until i put it in.

[lua]TEAM_HITM = AddExtraTeam(“Hitman [+]”, {
color = Color(0, 148, 255, 255),
model = “models/player/magnusson.mdl”,
description = [[ DONATOR JOB: You are the hitman.
You may kill People for money! DO NOT RDM.
YOU MAY RAID IF YOU HAVE A HIT ON THAT PERSON!]],
weapons = {“m9k_m98b”, “m9k_m92beretta”, “”},
command = “Hitp”,
max = 1,
salary = 60,
admin = 0,
vote = false,
hasLicense = false,
customCheck = function(ply) return table.HasValue({“Donator”, “VIP”, “VIP+”, “DonerAdmin”, “superadmin”, “DonerMod”, “Coder”, “Owner”}, ply:GetNWString(“usergroup”)) end
})
[/lua]

Is there an error? Switching jobs doesn’t work?

the jobs wont appear at all. They are just not there. When i take out the customcheck they come back

This job works for me, are you sure the problem is in that code? whats the error your getting.

Change the


customCheck = function(ply) return table.HasValue({"Donator", "VIP", "VIP+", "DonerAdmin", "superadmin", "DonerMod", "Coder", "Owner"}, ply:GetNWString("usergroup")) end

To


customCheck = function(ply) return ply:GetUserGroup() == "Donator" or ply:GetUserGroup() == "VIP" or ply:GetUserGroup() == "VIP+" or ply:GetUserGroup() == "DonerAdmin" or ply:GetUserGroup() == "superadmin" or ply:GetUserGroup() == "DonerMod" or ply:GetUserGroup() == "Coder" or ply:GetUserGroup() == "Owner" end,

Make sure the above is all in ONE LINE.

And change


weapons = {"m9k_m98b", "m9k_m92beretta", ""},

To


weapons = {"m9k_m98b", "m9k_m92beretta"},

that code is even worse than the ops.

[lua]
local allowed = {
Donator = true;
VIP = true;
[“VIP+”] = true;
DonerAdmin = true; – lol this is spelled wrong
superadmin = true;
DonerMod = true;
Coder = true;
Owner = true;
}

customCheck = function(ply) return allowed[ply:GetUserGroup()]; end;

[/lua]

MeepDarknessM

TYVM