AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   problem //Log This Kill , HELP ! (https://forums.alliedmods.net/showthread.php?t=209544)

klysman07 02-26-2013 18:56

problem //Log This Kill , HELP !
 
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(idattackerweaponDescription[]) {
    new 
szFragsszFrags2;
    
    if(
id != attacker) {
        
szFrags get_user_frags(attacker);
        
set_user_frags(attackerszFrags 1);
        
logKill(attackeridweaponDescription);
           
        
//=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(idszFrags2 1);
          
        
//=Replaced HUD death message
        
message_begin(MSG_ALLg_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_ALLg_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_ALLg_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(idszNamecharsmax(szName));
        
get_user_name(attackerszName1charsmax(szName1));
    }
}


// stock for log kill
stock logKill(idvictimweaponDescription[] ) {
    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,teamvweaponDescription );
    
//else
        
log_message("^"%s<%d><%s><%s>^" committed suicide with ^"%s^"",
        
namea,get_user_userid(id),authida,teamaweaponDescription );




can someone help me please?

Thank you!


All times are GMT -4. The time now is 21:39.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.