Make job hide if unavailable and in a certain DarkRP category?

I am trying to make it hide jobs in a certain category that are unavailable to the user.
My code I have been trying:


						local cat = DarkRP.getCategories()
				if jobUnavailable and cat == "Custom Jobs" then 
					self:Hide()
					self:SetVisible(false)
					return false
				end