Use the M4 in short bursts when you are like 20-50 feet away from an enemy, but any closer go full auto and put some holes in em!
The trick with pistols is to ALWAYS aim for the head. If you dont consider yourself a dead man. Also, crouching while firing will increase your accuracy dramatically.
As for the silencer, I only use it when there are only 3 or less people left on my team, since that is when you need to hide your position from the enemy so you actually have a chance to win the round when down at those odds.
The guy who gets the two headshots in a row is either 3 things:
1- A wall hacker or aimbot, so that is a given
2- Very, very,very,very lucky to land two headshots in a row
3- Skilled
To get headshots everytime, its best to practice against bots. Every time you see an enemy, try and "flick" your mouse upwards to the head, shoot, and crouch all at the same time. It will definetly take a lot of practice, but it will improve your chances to get headshots when you need them.
Also, a word for the wise- NEVER move while sniping. It is best to simply find a good vantage point, crouch down, and be a little pussy sniper. People dont get mad cuz its cheap; people get mad cuz they dont have the skills to do it too
I will post more later but its x-mas eve and I need to be with the family