Removing Job Change Notification

Hey Facepunch, been looking through and working on this for a little with no luck.
I have been trying to stop DarkRP from notifying everyone when someone switches a job.

local to_disable = {
	"has been made a",
}

timer.Simple(2, function()

	old_notify_all = old_notify_all or DarkRP.notifyAll

	function DarkRP.notifyAll(type_, length, msg)
		for k,v in pairs(to_disable) do
			if string.find(string.lower(msg), v) then return end
		end

	return old_notify_all(type_, length, msg)
	end

end)

not exactly sure what iā€™m doing wrong or how to fix it, would appreciate some guidance

Heh, go into game mode and find the line related to the change of profession. And remove the notification feature.

yeah, i did earlier, but decided to give it another shot now and it worked this time.
thank you!

Why make things complicated when a dedicated hook exists? : Hooks/Server/onNotify - DarkRP

1 Like