Making a swep shoot through multiple objects

well im wanting to make my swep shoot through one thing like a npc and hurt it then continue on its path and hurt anything else it hits like a player or prop. I just need a little pointer in where to look or if its been done.