How do I detect RCON login?
#2

With "OnRconLoginAttempt", example:

Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(!success) //If the password was incorrect
    {
        printf("Failed Rcon Login. IP: %s using Passwort%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;
}
Reply


Messages In This Thread
How do I detect RCON login? - by jakejohnsonusa - 29.12.2012, 21:42
AW: How do I detect RCON login? - by Blackazur - 29.12.2012, 21:46
Re: How do I detect RCON login? - by Mr.Anonymous - 29.12.2012, 21:47
Re: How do I detect RCON login? - by jakejohnsonusa - 29.12.2012, 21:48
Re: How do I detect RCON login? - by a.z.a.r - 29.12.2012, 21:57

Forum Jump:


Users browsing this thread: 1 Guest(s)