-------------------------------------------------------------------

function CheckUser(user,val)
	if IsGroupOnly == true and user:GetRankInGroup(GroupID) >= MinRank then
		val = true
	else
		val = false
	end
	if TeamOnly == true and user.TeamColor == TeamColor or user.Team == TeamName then
		val = true
	else
		val = false
	end
	if UserOnly == true then
		for _,i in pairs(UserNames) do
			if user.Name == i then
				val = true
				break;
			else
				val = false
			end
		end
	end
	if IsGroupOnly == false and TeamOnly == false and UserOnly == false then
		val = true
	end
	return val
end