diff --git a/plugins/tfc/stats.sma b/plugins/tfc/stats.sma index 4b802620..a4bc0a77 100755 --- a/plugins/tfc/stats.sma +++ b/plugins/tfc/stats.sma @@ -575,7 +575,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK){ set_task( 4.0 + float( param[1] ) ,"checkKills",0,param,sizeof(param)) } - if ( xmod_is_melee_wpn(wpnindex) && ( KnifeKill || KnifeKillSound ) ){ + if ( ( KnifeKill || KnifeKillSound ) && wpnindex && xmod_is_melee_wpn(wpnindex) ){ if ( KnifeKill ){ set_hudmessage(255, 100, 100, -1.0, 0.15, 1, 6.0, 6.0, 0.5, 0.15, -1) for (new i=1;i<=MaxClients;i++){ @@ -598,7 +598,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK){ } } - if ( headshot && (HeadShotKill || HeadShotKillSound) && !xmod_is_melee_wpn(wpnindex) ){ + if ( headshot && (HeadShotKill || HeadShotKillSound) && wpnindex && !xmod_is_melee_wpn(wpnindex) ){ if ( HeadShotKill ){ new weapon[32], message[256] xmod_get_wpnname(wpnindex,weapon,charsmax(weapon))