#1

Hello, guys and girls. Whirlpool is connected but when I enter the password(correctly) writes that the password is incorrect. If you disable the Whirlpool, you can login with any password.

PHP код:
forward LoginDialog(playeriddialogidresponselistitemstring:inputtext[]);
public 
LoginDialog(playeriddialogidresponselistitemstring:inputtext[]) {
    
#pragma unused dialogid, response, inputtext
    
if(response) {
        new 
user_name[32], hashed_password[129], user_password[129];
        if(
strlen(inputtext)) {
            
WP_Hash(hashed_passwordsizeof(hashed_password), inputtext);
            
GetPVarString(playerid,"user_password"user_password129);
            if(
strcmp(hashed_passworduser_passwordtrue) == 0) {
                
GetPVarString(playerid"user_name"user_name32);
                
format(a_stringsizeof a_string"{FFFFFF}Добро пожаловать на {FFD5A3}San Fierro Stories Project{FFFFFF}, %s!"user_name);
                
SendClientMessage(playeridCOLOR_WHITEa_string);
                if(
GetPVarInt(playerid"user_admin_level") > 0) {
                    if(
GetAdminLevel(playerid) == 1)
                        
format(a_stringsizeof a_string"{FFFFFF}Вы вошли как {00FF9D}игровой помощник{FFFFFF}.");
                    else if(
GetAdminLevel(playerid) > 1)
                        
format(a_stringsizeof a_string"{FFFFFF}Вы вошли как {FF0000}игровой администратор %d уровня."GetPVarInt(playerid"user_admin_level")-1);
                    
SendClientMessage(playeridCOLOR_WHITEa_string);
                }
                
ChooseCharacterQuery(playerid);
            } 
            else {
                
SetPVarInt(playerid"LogAttempts"GetPVarInt(playerid,"LogAttempts")+1);
                if(
GetPVarInt(playerid"LogAttempts") >= 1) {
                    
SendClientMessage(playeridCOLOR_HELPME"Вы ввели неверный пароль - вы были отключены от сервера.");
                    
KickPlayer(playerid);
                }
                
format(a_stringsizeof a_string""1-GetPVarInt(playerid,"LogAttempts"));
                
Dialog_ShowCallback(playeridusing callback LoginDialogDIALOG_STYLE_PASSWORD"{FFFFFF}Авторизация"a_string"Готово""Выход");
            }
            
        } 
        else {
            
SetPlayerLoginWindow(playerid);
        }
    }
    else {
        
SendClientMessage(playeridCOLOR_HELPME"Для закрытия игры введите команду - /q(uit)");
        
KickPlayer(playerid);
    }
    return 
true;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)