24.01.2014, 15:14
It's most likely your code, try this:
pawn Код:
forward Timer1();
public Timer1() //every second timer
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new
dest[512],
pos[2],
bytes;
GetPlayerNetworkStats(i,dest,sizeof(dest));
if ((pos[0] = strfind(dest, "Bytes received", true) + 16) > 15)
{
if ((pos[1] = strfind(dest, "Acks rece", true)) == -1)
continue;
dest[pos[1]] = '\0';
bytes = strval(dest[pos[0]]);
if (bytes > (LastBytes[i] + 20000))
{
WarningBytes[i] ++;
if (WarningBytes[i] > 3)
{
printf("[Attack 2] Player %d",i);
Kick(i);
continue;
}
}
LastBytes[i] = bytes;
}
}
}
}