local meta = FindMetaTable("Player")
if CLIENT then
	local PlayerNLR = false
	net.Receive("NLR_UpdateStatus", function(len, ply)
		PlayerNLR = net.ReadBool()

		hook.Run("NLR_GhostState", PlayerNLR)
	end)

	function meta:IsGhost()
		return PlayerNLR or false
	end
end

if SERVER then
	function meta:IsGhost()
		return self.NLR or false
	end
end

hook.Add("PlayerSwitchWeapon", "NLR_PlayerSwitchWeapon", function(ply, o, n)
	if ply:IsGhost() and NLR and !NLR.ghostinteract and n:GetClass() != "weapon_nlr" then
		return true
	end
end)