Quote:
Originally Posted by TonyBaretta
mmm no?
the only thing need to be fixed is this
L 05/01/2015 - 13:56:25: [SM] [0] Line 116, D:\PLUGINS TONY\csgo 5kills plugin\SERVER SIDE\addons\sourcemod\scripting\csgo_5kill.sp ::Event_round_end()
L 05/01/2015 - 13:57:26: [SM] Plugin encountered error 15: Array index is out of bounds
|
I've no idea why people still using GetMaxClient() which are deprecated for more than 7years...
Try to change the following start from line 112:
Code:
public Event_round_end(Handle:event, const String:name[], bool:dontBroadcast)
{
for(new client=1;client <= g_iMaxClients;client++)
{
g_killCount[client] = 0;
if((g_taskCountdown[client] !=INVALID_HANDLE) && (g_killCount[client]!=0))
{
KillTimer(g_taskCountdown[client]);
g_taskCountdown[client] =INVALID_HANDLE;
}
}
}
to:
Code:
public Event_round_end(Handle:event, const String:name[], bool:dontBroadcast)
{
for (new client = 1; client <= MaxClients; client++)
{
if (IsClientInGame(i)) {
g_killCount[client] = 0;
if ((g_taskCountdown[client] != INVALID_HANDLE) && (g_killCount[client] != 0))
{
KillTimer(g_taskCountdown[client]);
g_taskCountdown[client] = INVALID_HANDLE;
}
}
}
}
And from line 38:
Code:
new g_killCount[33] = 0, g_iMaxClients = 0;
To:
Code:
new g_killCount[MAXPLAYERS + 1] = 0, g_iMaxClients = 0;
__________________