Create an invisible entity for each player, using prethink make it stick to the player's head, then register touch to detect if any other player touched that player's head entity, and if so, make the player who touched that entity stick to it's victims head by using prethink, then set a timer and execute ham kill
Use a two dimensional boolean arrays in order to transmit the required data from touch to prethink ( g_TouchedHead[33][33], where in the first cell you will store the attacker's index and in the second one the victim's index )