Basic:
Force array variable for all the players...
A generic damage detection trigger (you can look for Damage Detection Systems)
Task:
1.) I would assume that the force array variable is already initialized. If not, initialize them from 1 to the number of players you have.
2.) Using the damage detecting trigger, check if the damaged unit is an enemy and add the player of the damage-dealing unit to the force variables of all allied players, except for the player's own force variable.
3.) When a unit dies, get the owner of the killing unit, get its' force variable, and you have the players who have assisted you in this endeavor. Clear the force variable afterwards.
Drawbacks:
1.) If you dealt damage to an enemy unit, bringing it to the brink of death and your ally kills him/her, you would be labelled among those who assisted in the killing.
2.) It's a nasty case of permutation.
3.) If you harmed an enemy unit, then your ally harmed the enemy unit, and you kill another enemy unit, then the system would not know that your ally harmed the first enemy unit and when you kill it, no assist would turn up unless your ally will harm the enemy unit again.