07.01.2012, 13:56
How to detect that player that have same ip and login together 5 player will be ban automatic ??
forward CheckDuplicateIp();
public CheckDuplicateIp()
{
new ip[16];
new count[32];
new string[256];
for(new i = 0; i<MAX_PLAYERS;i++)
{
GetPlayerIp(i, ip, 16);
count[ip]++; // ERROR
if(count[ip] >= 5) // ERROR
{
format(string,sizeof(string),"banip %s",ip);
SendRconCommand(string);
SendRconCommand("reloadbans");
}
}
return 1;
}
error 033: array must be indexed (variable "ip")