public static void CheckCorrectLogin(string username, string password, int fromClient) { //Console.WriteLine("Login " + username + " " + password); //AccountsAmount = Usernames.Count; //Console.WriteLine(Usernames.Length); for (int i = 0; i < Usernames.Length /*Count*/; i++) { //Console.WriteLine(Usernames[i]); if (username == Usernames[i]) { if (password == Passwords[i]) { //Logged :) ServerSend.LoginResult(fromClient, true, "Logged"); } else { //Wrong password :( ServerSend.LoginResult(fromClient, false, "Wrong password"); } return; } } ServerSend.LoginResult(fromClient, false, "Wrong username or account not exist"); }