I'm working on a DarkRP server and was trying to make a VIP/Donator usergroup for certain jobs. I tried multiple variations but everything seems to had a problems. I'm just here to ask if there is something I missed or didn't try.
I was using custom check with usergroups in order to make it so only the specific usergroup can be that job.
This is the code of the job:
TEAM_SPY = DarkRP.createJob("Spy", {
color = Color(100, 100, 100, 255),
model = {"models/player/legion/3e_soldier.mdl"},
description = [[You are a spy.
Use your skills to infiltrate and steal info & supplies.]],
weapons = {"prokeypadcracker","climb_swep2","pro_lockpick_update"},
command = "spy",
max = 4,
salary = 60,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
customCheck = function(ply) return ply:GetUserGroup("VIP") end,
CustomCheckFailMsg = "You need to be VIP.",
category = "Citizens",
})
So the usergroup is "VIP". When I make this usergroup through ulx menu I chose to inherit from "user"
The problem with this is that while the VIP group can become the job, so can the user. This kind of defeats the purpose.
Next I tried to inherit it from the next one up, operator. So now, the user can't become the job, and the VIP can. This is good, it would work, but now the VIP can also become jobs with ply:IsAdmin(). I would rather not have people be able to become Admin jobs who are not admins.
Any help is appreciated. I'm not the most fluent in coding.