edit: ops i fixed previously i mixed 'item' and 'ent', i like to use 'item' but seems more proper to use 'ent' as in sdk Hi,

My friend suggested a plugin that allows players to place bounty on other players. What I was most concerned with was, how will i keep track of kills.

I thought, there must a nice way, otherwise i would have to go by the printed obituary i.e "Padawan was detonated by WEAPON_X"... but then I found the better way.

When a player is killed, the game creates a temporary entity that is broadcasted to clients and it has all the information about the kill. Since all temporary entities go through LinkEntity() i thought I was finished. However it turns out the data is set after LinkEntity().

finally, i decided to try by checking at Unlinkentity(). So by checking unlinkentity you can get who was killed, by who and how. bellow is example:

In JASS_Syscall(int cmd, int arg0 .....)

if (cmd == G_UNLINKENTITY) { gentity_t* ent = (gentity_t*)arg0; if (!strncmp(ent->classname, "tempEntity", 10)){ if (ent->s.eType == 111) // 111 = an kill broadcast entity { // here you can grab the data, see bellow for where the data is located } } }

according to sdk this is where the data would be found is

method of death : ent->s.eventParm the person who died: ent->s.otherEntityNum the killer: ent->s.otherEntityNum2