Donator Jobs

Hey, i’m sure most have asked. But it’s really unanswered. How would I make a donator only job for DarkRP. But people that arnt donators such as default users can still see the jobs. Thanks

[editline]20th February 2013[/editline]

I use ULX, but if you have another program tell me.

[editline]20th February 2013[/editline]

FIXED! I messed around with some coding and did it :smiley:

Actually I need help, i’ve already set it up. But when I make a class that you must vote in, it would turn out not to be donator only.

Code?

With [lua] tags.

You need to add a custom check.
Example:


TEAM_MEDIC = AddExtraTeam("Medic", {
	color = Color(47, 79, 79, 255),
	model = "models/player/kleiner.mdl",
	description = [[With your medical knowledge,
		you heal players to proper
		health.
		Without a medic, people can not be healed.
		Left click with the Medical Kit to heal other players.
		Right click with the Medical Kit to heal yourself.]],
	weapons = {"med_kit"},
	command = "medic",
	max = 3,
	salary = 45,
	admin = 0,
	vote = false,
	hasLicense = false,
	customCheck = function(ply)
         return ply:GetUserGroup()== "donator"
    end
})

That doesnt display the job to everyone

Oh, my bad. I guess I skipped that part. Forget about my previous post and try this:
Go to your player.lua and find the meta:ChangeTeam function.
Add this inside the function:


if t == TEAM_NAMEHERE and not self:IsUserGroup("donator") then
    GAMEMODE:Notify(self, 1, 4, string.format("Message for non-donators."))
    return 
end

Would this work aswel?


if t == TEAM_SWAT or t == TEAM_SWATSNIPER or t == TEAM_HITMAN and not self:IsUserGroup("donator") or self:IsUserGroup("superadmin") or self:IsUserGroup("rootadmin") or self:IsUserGroup("owner") then
	GAMEMODE:Notify(self, 1, 4, string.format("Message for non-donators.")
	return 
end

or use ply:isadmin or something, it will count both superadmin and admin, and probably any inheriting these

sorry wrong topic