tested it myself, in the units init field in the editor:
this addEventHandler ["killed",{removeallweapons s1}]
Just name all the players. In the above case, the player name (in the editor) is s1.
The 2nd one s2 (and change the code accordingly).
_this and this didn't work for me (either got your error, or the weapons weren't removed).
gl.