Something for you to try.
int headShotCount[127]; //bad, but whatever
extern cPlayer *(*FindPlayer)(int);
//player join
headshotCount[playerId] = 0;
//when player is damaged:
void my_script::Damaged(GameObject *o, GameObject *Attacker, float damage)
{
int playerId = Get_Player_Id(o);
cPlayer *p = FindPlayer(playerId);
if(!p) return;
headShotCount[playerId] = p->HeadShots;
}
//when player is killed
void my_script::Killed(GameObject *o, GameObject *Attacker)
{
int killerId = Get_Player_Id(Attacker);
cPlayer *killer = FindPlayer(killerId);
if(!killer) return;
if(killer->HeadShots > headShotCount[killerId])
{
headShotCount[killerId] = killer->HeadShots;
Console_Input("msg headshot");
}
}