SA-MP Forums Archive
OnRconLoginAttempt-Where is wrong? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnRconLoginAttempt-Where is wrong? (/showthread.php?tid=160605)



OnRconLoginAttempt-Where is wrong? - ppanlie - 17.07.2010

pawn Код:
new RconAttempTime[50][24];
new RconAttempTime2[50];
public OnRconLoginAttempt(ip[], password[], success)
{
    if(success)return 1;
    for(new i;i<MAX_PLAYERS;i++)
    {
        if(strcmp(RconAttempTime[i],ip)==0)
        {
            RconAttempTime2[i]++;
            if(RconAttempTime2[i]==5)
            {
                new string[256];format(string,256,"banip %s",ip);
                printf("%s banned ",ip);
                SendRconCommand(string);
                RconAttempTime2[i]=0;
            }
            return 1;
        }else
        {
        format(RconAttempTime[i],24,"%s",ip);
        RconAttempTime2[i]++;
        }
    }
    return 1;
}
It just don't work (