20.05.2010, 00:00 
	
	
	
		Here yah go. http://pastebin.com/sv9ETgeG 
The reason I didn't do it like that, is because you shouldn't declare all those variables and get the time and get the date every single time. MAX_PLAYERS is equal to 500, meaning you would declare those variables and call those functions 500 times when you could just do it once.
	
	
	
	
Quote:
| 
 
					Originally Posted by Coole210  
Here this will display name i just made it 
Код: 
public OnRconLoginAttempt(ip[], password[], success)
{
  if(!success)
  {
    printf("RCON LOGIN FAILED IP %s USING PASSWORD %s",ip, password);
    new pip[16];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
      GetPlayerIp(i, pip, sizeof(pip));
      new Year,Month,Day,Hour,Minute,Second,namee[MAX_PLAYER_NAME];
      Getdate(Year,Month,Day);
      Gettime(Hour,Minute,Second);
      GetPlayerName(playerid,namee,sizeof(namee));
      format(string,sizeof(string),"[%02d-%02d-%02d @ %02d:%02d:%02d] %s[IP:%s] - Failed password: %s",Year,Month,Day,Hour,Minute,Second,namee,pip,password);
			new File: badattemptfile=fopen("Bad_Attempts.txt",io_append);
			if(!badattemptfile)
			{
			  fcreate("Bad_Attempts.txt");
			}
			fwrite(badattemptfile,string);
			fclose(badattemptfile);
			if(!strcmp(ip, pip, true))
      {
        SendClientMessage(i, 0xFFFFFFFF, "You typed the wrong password, DON'T DO IT AGAIN!");
        Kick(i);
      }
    }
  }
  return 1;
}
 | 

