• My Admin on Duty is not working for Moderator but is working for any other rank?
    6 replies, posted
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 })
Put your cusomCheck function in one line for visibility's sake. And for future reference use [noparse][code][/code][/noparse] tags. Also, I don't know what the "prior = false," is there, but it isn't a parameter on the wiki( just checked )
[QUOTE=crazyscouter;45567945]Put your cusomCheck function in one line for visibility's sake. And for future reference use [noparse][code][/code][/noparse] tags. Also, I don't know what the "prior = false," is there, but it isn't a parameter on the wiki( just checked )[/QUOTE] 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 [code] 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 }) [/code]
Okay, thanks.
[QUOTE=AnonTakesOver;45567968]Stuff[/QUOTE] I know what's it's for. I just think the op shouldn't be messing with custom parameters if he can't get a customCheck function working :v:
[QUOTE=crazyscouter;45571429]I know what's it's for. I just think the op shouldn't be messing with custom parameters if he can't get a customCheck function working :v:[/QUOTE] I presumed you knew, that was just more of a global statement to others wondering :)
[QUOTE=PredzVAIN;45567798] description = [[You are a admin. Move your ass and watch the server!]], [/QUOTE] An admin* Btw hello Anon.
Sorry, you need to Log In to post a reply to this thread.