If playername is not then....
#9

try this:
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(!success)
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            new playername[24];
            GetPlayerName(i, playername, sizeof(playername));
           
            if(strcmp(playername, "Nicky_Newsted", true) == 13 || strcmp(playername, "[TCL]Nicky", true) == 10)
            {
                SendClientMessage(i, COLOR_RED, "Wrong password!!");
            }
        }
    }
    else
    {
        printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s", ip, password);
        new pip[16];
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            GetPlayerIp(i, pip, sizeof(pip));
            if(!strcmp(ip, pip, true))
            {
                SendClientMessage(i, 0xFFFFFFFF, "Wrong Password. Bye!");
                SendClientMessage(i, COLOR_RED, "You have tried to login at RCON but you don't have the");
                SendClientMessage(i, COLOR_RED, "password. You have been banned for trying");
                SendClientMessage(i, COLOR_RED, "to hack using RCON");
                Ban(i);
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
If playername is not then.... - by Nicky_Newsted - 23.03.2012, 00:11
Re: If playername is not - by new121 - 23.03.2012, 00:18
Re: If playername is not then.... - by Nicky_Newsted - 23.03.2012, 00:22
Re: If playername is not then.... - by Skribblez - 23.03.2012, 00:30
Re: If playername is not then.... - by new121 - 23.03.2012, 00:31
Re: If playername is not then.... - by [KHK]Khalid - 23.03.2012, 00:33
Re: If playername is not then.... - by Skribblez - 23.03.2012, 00:38
Re: If playername is not then.... - by Jonny5 - 23.03.2012, 00:41
Re: If playername is not then.... - by Skribblez - 23.03.2012, 00:53
Re: If playername is not then.... - by Nicky_Newsted - 23.03.2012, 13:18

Forum Jump:


Users browsing this thread: 2 Guest(s)