ok I will edit it then.
[EDIT] never used these functions before but here is what I came up with, correct me if I am wrong.
highlighted the changes in do damge func.
Code:
new gKiller = 0;
new gVictim = 0;
public plugin_init() {
//...
register_message(get_user_msgid("DeathMsg"), "Block_DeathMsg");
}
public DoExtraDamage(id, attacker) {
new xtra_dmg = get_pcvar_num(pcvar[CDMG]);
new health = pev(id, pev_health);
set_pev(id, pev_health, float(health-xtra_dmg));
if((health-xtra_dmg) <= 0) {
gBlockDeathMsg = 1;
user_kill(id, 1);
gKiller = attacker;
gVictim = id;
// Update killers scorboard with new info
message_begin(MSG_ALL, get_user_msgid("ScoreInfo"))
write_byte(attacker)
write_short(get_user_frags(attacker))
write_short(get_user_deaths(attacker))
write_short(0)
write_short(get_user_team(attacker))
message_end()
// Update victims scoreboard with correct info
message_begin(MSG_ALL, get_user_msgid("ScoreInfo"))
write_byte(id)
write_short(get_user_frags(id))
write_short(get_user_deaths(id))
write_short(0)
write_short(get_user_team(id))
message_end()
}
}
public Block_DeathMsg(msg_id, msg_dest, entid) {
if(gBlockDeathMsg) {
//As of AMX Mod X 1.5, the middle parameter of set_* no longer does anything.
set_msg_arg_int(1, 1, gKiller);
set_msg_arg_int(2, 1, gVictim);
set_msg_arg_int(3, 1, 0);
set_msg_arg_string(4, "grenade");
gBlockDeathMsg = 0;
return PLUGIN_CONTINUE;
}
return PLUGIN_CONTINUE;
}
__________________