Doesn't ban me.
#3

a fast example from sa-mp wiki:

pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(!success) //If the password was incorrect
    {
        printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
        new pip[16];
        for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players
        {
            GetPlayerIp(i, pip, sizeof(pip));
            if(!strcmp(ip, pip, true)) //If a player's IP is the IP that failed the login
            {
                SendClientMessage(i, 0xFFFFFFFF, "Wrong Password. Bye!"); //Send a message
                Ban(i); //They are now banned.
            }
        }
    }
    return 1;
}
Explanation:-

this code gets the ip of the person that typed the failed password and it searches if there are other players that have the same ip and ban them all together.

any feedback would be appreciated!
Reply


Messages In This Thread
Doesn't ban me. - by Glossy42O - 23.10.2014, 18:02
Re: Doesn't ban me. - by Glossy42O - 24.10.2014, 03:34
Re: Doesn't ban me. - by Stanford - 24.10.2014, 07:24
Re: Doesn't ban me. - by Steel_ - 24.10.2014, 07:25
Re: Doesn't ban me. - by Glossy42O - 24.10.2014, 16:26
Re: Doesn't ban me. - by Glossy42O - 25.10.2014, 02:58
Re: Doesn't ban me. - by Stanford - 25.10.2014, 05:13
Re: Doesn't ban me. - by Glossy42O - 25.10.2014, 05:27
Re: Doesn't ban me. - by Glossy42O - 27.10.2014, 19:36
Re: Doesn't ban me. - by M0HAMMAD - 27.10.2014, 20:03

Forum Jump:


Users browsing this thread: 1 Guest(s)