A man who pleaded guilty in the fatal shooting of four family members has been sentenced to life in prison.