People keep complaining they get shot down when going for this, so I have two ways:
1: Spawn on a flag. Just camp in a concrete building beside the flag. When an enemy goes to capture the flag, simply run a them and press Y to melee them. One hit kill.
2: If you are in a tank, and some annoying enemy is running around your tank (noobs like to do this), press B to exit the tank then just press Y to melee them. They won't expect it.