Here is my code for the job. I hope someone knows what’s wrong or to add something. Thx!
TEAM_AOD = AddExtraTeam(“Admin on Duty”, {
color = Color (0, 136, 136),
model = “models/player/barney.mdl”,
description = [[You are a admin. Move your ass and watch the server!]],
weapons = {“arrest_stick”,“unarrest_stick”},
command = “aod”,
max = 0,
salary = 250,
admin = 1,
vote = false,
hasLicence = false,
prior = false,
customCheck = function(ply)
return CLIENT or ply:GetUserGroup() == “moderator”
end
})
You can add your own variables to the table, it helps when making custom jobs that you later want to do some checks with in a different script, when a player changes job or anything job related you can do job.prior for example, it’s useful for certain things.
Also, it’s only defined for moderator, make it like this
local ranks = {["moderator"] = true, ["admin"] = true }
TEAM_AOD = AddExtraTeam("Admin on Duty", {
color = Color (0, 136, 136),
model = "models/player/barney.mdl",
description = [[You are a admin. Move your ass and watch the server!]],
weapons = {"arrest_stick","unarrest_stick"},
command = "aod",
max = 0,
salary = 250,
admin = 1,
vote = false,
hasLicence = false,
prior = false,
customCheck = function(ply)
return CLIENT or ranks[ply:GetUserGroup()]
end
})