DarkRP:How to create donator jobs

From Serenity Servers Support

Creating Donator jobs in DarkRP is as easy as adding a simple piece of code.

Add this to your job, as seen below.

customCheck = function(ply) return ply:GetNWString("usergroup") == "donator" or ply:IsAdmin() end,
CustomCheckFailMsg = "This job is VIP only!"


In practice it will look somewhat like this.

TEAM_NAME = DarkRP.createJob("JOB NAME", {
	color = Color(20, 150, 20, 255),
	model = "models/player/model.mdl",
	description = [[Describe the job]],
	weapons = {},
	command = "JOB",
	max = 0,
	salary = 55,
	admin = 0,
	vote = false,
	hasLicense = false,
	candemote = false,
	category = "Citizens",
	customCheck = function(ply) return ply:GetNWString("usergroup") == "donator" or ply:IsAdmin() end,
	CustomCheckFailMsg = "This job is VIP only!"
})

Banner
Promo