Donor entity

I use this for my donor jobs but it does not work with entities.


    customCheck = function(ply) return ply:GetUserGroup() == "vip" or ply:IsAdmin() or ply:GetUserGroup() == "donor" or ply:GetUserGroup() == "mvp" or ply:GetUserGroup() == "hall of fame" end,
    CustomCheckFailMsg = "You need certain donor perks for this job."

This is what I want donor only.


AddEntity("Sapphire Printer", {
        ent = "sapphire_money_printer",
        model = "models/props_c17/consolebox01a.mdl",
        price = 7500,
        max = 2,
        cmd = "/buysapphire"
})

Dakrp v2.4.3

Please don’t tell be to google this shit because I’ve searched everywhere, help is appreciated.

This is what my old community used to use, and it worked as of about a month ago. customCheckFailMsg didn’t work when I tried using it, but DarkRP already gives a nice little “No” when you can’t buy it.



AddEntity("Platinum Printer", {
	ent = "platinum_printer",
	model = "models/props_lab/reciever_cart.mdl",
	price = 3600,
	max = 2,
	cmd = "/buyplatprinter",
	customCheck = function(ply) return ply:GetNWString("usergroup") == "Vip" or ply:IsAdmin() or ply:IsSuperAdmin() or ply:GetNWString("usergroup") == "Council" end,
	})


Thanks. Question solved.

Final Code


AddEntity("Sapphire Printer", {
	ent = "sapphire_money_printer",
	model = "models/props_c17/consolebox01a.mdl",
	price = 1700,
	max = 2,
	cmd = "/buysapphire",
	customCheck = function(ply) return ply:GetNWString("usergroup") == "vip" or ply:IsAdmin() or ply:IsSuperAdmin() or ply:GetNWString("usergroup") == "mvp" or ply:GetNWString("usergroup") == "hall of fame" or ply:GetNWString("usergroup") == "donor" end,
	})