So I've seen this issue where a player with high ping freezes mid-air, then when he unfreezes you just get killed by an headshot and you can't do anything about it.
A fix for this bug would be to calculate the time that passes between the moment that he freezes and the moment that he unfreezes. That could be done by storing the 2 timestamps in 2 separate variables and getting the difference. Then if too much time has passed, the hits that have been done between that period don't count.
I hope this helps.