public OnRconLoginAttempt(ip[], password[], success)
#2

you need a R7 server
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!"); //Send a message
                SetPVarInt( i, "PasswordWarnings", GetPVarInt( i, "PasswordWarnings" ) + 1 );
        if( GetPVarInt( i, "PasswordWarnings" ) == 3 ) {
          DeletePVar( i, "PasswordWarnings" );
                Kick(i);
}
}
}
  }
  return 1;
}
Reply


Messages In This Thread
public OnRconLoginAttempt(ip[], password[], success) - by DowNlOaD_ - 09.04.2010, 09:42
Re: public OnRconLoginAttempt(ip[], password[], success) - by johnathon956 - 09.04.2010, 09:46
Re: public OnRconLoginAttempt(ip[], password[], success) - by DowNlOaD_ - 09.04.2010, 09:49
Re: public OnRconLoginAttempt(ip[], password[], success) - by Grim_ - 09.04.2010, 09:55
Re: public OnRconLoginAttempt(ip[], password[], success) - by DowNlOaD_ - 09.04.2010, 09:57
Re: public OnRconLoginAttempt(ip[], password[], success) - by Grim_ - 09.04.2010, 09:58

Forum Jump:


Users browsing this thread: 1 Guest(s)