From fec17e2bf5c4ea6d07a6cb9dc9474277b12a7635 Mon Sep 17 00:00:00 2001 From: 9iky6 Date: Sat, 26 Jul 2014 20:33:07 +0600 Subject: [PATCH] Update statsx.sma Fix MAX_PLAYERS -> MaxClients --- plugins/cstrike/statsx.sma | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/cstrike/statsx.sma b/plugins/cstrike/statsx.sma index a2961c55..22ac7c1f 100755 --- a/plugins/cstrike/statsx.sma +++ b/plugins/cstrike/statsx.sma @@ -513,7 +513,7 @@ add_most_disruptive(id, sBuffer[MAX_BUFFER_LENGTH + 1]) iMaxHeadShots = 0 // Find player. - for (iPlayer = 1; iPlayer < MAX_PLAYERS; iPlayer++) + for (iPlayer = 1; iPlayer < MaxClients; iPlayer++) { if (g_izUserRndStats[iPlayer][STATS_DAMAGE] >= iMaxDamage && (g_izUserRndStats[iPlayer][STATS_DAMAGE] > iMaxDamage || g_izUserRndStats[iPlayer][STATS_HS] > iMaxHeadShots)) { @@ -549,7 +549,7 @@ add_best_score(id, sBuffer[MAX_BUFFER_LENGTH + 1]) iMaxHeadShots = 0 // Find player - for (iPlayer = 1; iPlayer < MAX_PLAYERS; iPlayer++) + for (iPlayer = 1; iPlayer < MaxClients; iPlayer++) { if (g_izUserRndStats[iPlayer][STATS_KILLS] >= iMaxKills && (g_izUserRndStats[iPlayer][STATS_KILLS] > iMaxKills || g_izUserRndStats[iPlayer][STATS_HS] > iMaxHeadShots)) { @@ -1330,7 +1330,7 @@ public eventStartRound() } // Clear game stats, incl '0' that is sum of all users. - for (id = 0; id < MAX_PLAYERS; id++) + for (id = 0; id < MaxClients; id++) { for (i = 0; i < 8; i++) g_izUserGameStats[id][i] = 0 @@ -1348,7 +1348,7 @@ public eventStartRound() } // Clear user round stats, incl '0' that is sum of all users. - for (id = 0; id < MAX_PLAYERS; id++) + for (id = 0; id < MaxClients; id++) { g_izUserRndName[id][0] = 0 @@ -1412,7 +1412,7 @@ public delay_spawn(args[]) g_fzShowUserStatsTime[id] = 0.0 g_izUserAttackerDistance[id] = 0 - for (new i = 0; i < MAX_PLAYERS; i++) + for (new i = 0; i < MaxClients; i++) g_izUserVictimDistance[id][i] = 0 return PLUGIN_CONTINUE