A drug dealer who pointed a loaded gun at police officers and a member of the public in Salford has been sentenced to 14 years in prison.