Apollo wrote:
It shows the currently equipped weapon of the person that killed you, not necessarily how you died.
You probably fell off a building. Or stubbed your toe. Or broke a nail. Precious medics.

I do note with interest that all the complaints of "I was sniped from 800m with a pistol" have stopped since I introduced that little script.
That's the theory, but it seems to "lose" the killer about 30% of the time, or sometimes gets the weapon or range wrong. It fluctuates, sometimes being really well behaved and other times being appalling - presumably something to do with server load levels?