i used last version sm1.8-git6046
L 05/28/2018 - 00:08:56: SourceMod error session started
L 05/28/2018 - 00:08:56: Info (map "de_dust2") (file "errors_20180528.log")
L 05/28/2018 - 00:08:56: [SM] Exception reported: Array index is out of bounds
L 05/28/2018 - 00:08:56: [SM] Blaming: Addons_kento_rankme.smx
L 05/28/2018 - 00:08:56: [SM] Call stack trace:
L 05/28/2018 - 00:08:56: [SM] [1] Line 1885, Addons_kento_rankme.sp::EventPlayerHurt
L 05/28/2018 - 01:06:41: Error log file session closed.
L 05/28/2018 - 01:43:54: SourceMod error session started
L 05/28/2018 - 01:43:54: Info (map "de_dust2") (file "errors_20180528.log")
L 05/28/2018 - 01:43:54: [SM] Exception reported: Array index is out of bounds
L 05/28/2018 - 01:43:54: [SM] Blaming: Addons_kento_rankme.smx
L 05/28/2018 - 01:43:54: [SM] Call stack trace:
L 05/28/2018 - 01:43:54: [SM] [1] Line 1885, Addons_kento_rankme.sp::EventPlayerHurt
L 05/28/2018 - 01:57:57: SourceMod error session started
L 05/28/2018 - 01:57:57: Info (map "de_dust2") (file "errors_20180528.log")
PHP Code:
public Action:EventPlayerHurt(Handle:event, const String:name[], bool:dontBroadcast)
// ----------------------------------------------------------------------------
{
if (!g_bEnabled || !g_bGatherStats || g_MinimumPlayers > GetCurrentPlayers())
return;
new victim = GetClientOfUserId(GetEventInt(event, "userid"));
new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
if (!g_bRankBots && (attacker == 0 || IsFakeClient(victim) || IsFakeClient(attacker)))
return;
if (victim != attacker && attacker > 0 && attacker < MAXPLAYERS) {
new hitgroup = GetEventInt(event, "hitgroup");
if (hitgroup == 0) // Player was hit by knife, he, flashbang, or smokegrenade.
return;
g_aStats[attacker][HITS]++;
g_aSession[attacker][HITS]++;
g_aHitBox[attacker][hitgroup]++; //line 1885
new damage = GetEventInt(event, "dmg_health");
g_aStats[attacker][DAMAGE] += damage;
g_aSession[attacker][DAMAGE] += damage;
//PrintToChat(attacker, "Hitgroup %i: %i hits", hitgroup, g_aHitBox[attacker][hitgroup]);
//PrintToServer("Stats Hits: %i\nSession Hits: %i\nHitBox %i -> %i",g_aStats[attacker][HITS],g_aSession[attacker][HITS],hitgroup,g_aHitBox[attacker][hitgroup]);
}
}