How to have DarkRP categories show the jobs inside to people without access?
6 replies, posted
Hi,
I have a "Donator Jobs" category on my DarkRP server and so I don't have to tell all of the non-donators what jobs there are, is there a way to have it so that everyone that isn't a donator can see what is inside? Code attached.
[CODE]DarkRP.createCategory{
name = "Donator Jobs",
categorises = "jobs",
startExpanded = false,
color = Color(252, 149, 227, 255),
canSee = function(ply) return true end,
sortOrder = 500,
}[/CODE]
Thanks,
- Tone
bump
bumpppppp
bumppppperinos
[QUOTE=Tone Abet;49017580]Hi,
I have a "Donator Jobs" category on my DarkRP server and so I don't have to tell all of the non-donators what jobs there are, is there a way to have it so that everyone that isn't a donator can see what is inside? Code attached.
[/QUOTE]
I'm going to assume you use ULX, with a donator group called "donator"
[CODE]DarkRP.createCategory{
name = "Donator Jobs",
categorises = "jobs",
startExpanded = false,
color = Color(252, 149, 227, 255),
canSee = function(ply) return ply:CheckGroup("donator") end,
sortOrder = 500,
}[/CODE]
This would mean that only donators, and groups that inherit from donator would see the category.
Apart from the canSee line, sometimes its the f4 menu showing / not showing them without using that line.
[url]https://github.com/FPtje/DarkRP/blob/master/gamemode/config/config.lua#L461[/url]
Change it to true.
Sorry, you need to Log In to post a reply to this thread.