I have a serious problem with "Log This Kill"
TR when one kills a CT does not show who killed him, but it appears he has killed himself .
I'm using this mod jailbreak.
https://forums.alliedmods.net/showth...=jailbreak+mod
I think the problem may be here:
PHP Code:
///stock for create kill
stock createKill(id, attacker, weaponDescription[]) {
new szFrags, szFrags2;
if(id != attacker) {
szFrags = get_user_frags(attacker);
set_user_frags(attacker, szFrags + 1);
logKill(attacker, id, weaponDescription);
//=Kill the victim and block the messages
set_msg_block(g_iMsgDeath,BLOCK_ONCE);
set_msg_block(g_iMsgScoreInfo,BLOCK_ONCE);
user_kill(id);
//=user_kill removes a frag, this gives it back
szFrags2 = get_user_frags(id);
set_user_frags(id, szFrags2 + 1);
//=Replaced HUD death message
message_begin(MSG_ALL, g_iMsgDeath,{0,0,0},0);
write_byte(attacker);
write_byte(id);
write_byte(0);
write_string(weaponDescription);
message_end();
//=Update killers scorboard with new info
message_begin(MSG_ALL, g_iMsgScoreInfo);
write_byte(attacker);
write_short(szFrags);
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, g_iMsgScoreInfo);
write_byte(id);
write_short(szFrags2);
write_short(get_user_deaths(id));
write_short(0);
write_short(get_user_team(id));
message_end();
new szName[32], szName1[32];
get_user_name(id, szName, charsmax(szName));
get_user_name(attacker, szName1, charsmax(szName1));
}
}
// stock for log kill
stock logKill(id, victim, weaponDescription[] ) {
new namea[32],namev[32],authida[35],authidv[35],teama[16],teamv[16];
//Info On Attacker
get_user_name(id,namea,charsmax(namea));
get_user_team(id,teama,15);
get_user_authid(id,authida,34);
//Info On Victim
get_user_name(victim,namev,charsmax(namev));
get_user_team(victim,teamv,15);
get_user_authid(victim,authidv,34);
//Log This Kill
if(id != victim)
log_message("^"%s<%d><%s><%s>^" killed ^"%s<%d><%s><%s>^" with ^"%s^"",
namea,get_user_userid(id),authida,teama,namev,get_user_userid(victim),authidv,teamv, weaponDescription );
//else
log_message("^"%s<%d><%s><%s>^" committed suicide with ^"%s^"",
namea,get_user_userid(id),authida,teama, weaponDescription );
}
can someone help me please?
Thank you!