From b40643950d8249df61e0d4362b5571b1d5fcada6 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 29 Oct 2004 02:15:01 +0000 Subject: [PATCH] added some runtime checks --- plugins/cstrike/miscstats.sma | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/cstrike/miscstats.sma b/plugins/cstrike/miscstats.sma index 2ac44628..2f269a6e 100755 --- a/plugins/cstrike/miscstats.sma +++ b/plugins/cstrike/miscstats.sma @@ -253,7 +253,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK) { if ( EnemyRemaining ) { new ppl[32], pplnum new team = get_user_team( victim ) - 1 - if ( team >= 0 ) + if ( team >= 0 && team < 4 ) get_players(ppl,pplnum,"e", g_teamsNames[1 - team] ) if (pplnum) { new eppl[32], epplnum @@ -328,7 +328,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK) { else if ( GrenadeSuicide ) show_hudmessage(0,"%L",LANG_PLAYER,g_SHeMessages[ random_num(0,3) ],victim_name) } if ( headshot && (HeadShotKill || HeadShotKillSound) ) { - if ( HeadShotKill ) { + if ( HeadShotKill && wpnindex ) { new killer_name[32], victim_name[32], weapon_name[32], message[128], players[32], pnum xmod_get_wpnname(wpnindex,weapon_name,31) get_user_name(killer,killer_name,31)