05.04.2012, 21:17
I get an incorrect password even if the password is correct. Password's hash prints the correct output which is in the file, I think I am using strcmp wrong.
Please help.
pawn Код:
case 2:
{
if(!response)
{
Kick(playerid);
}
else
{
new buf[129];
INI_ParseFile(UserPath(playerid), "LoadUserData_%s", .bExtra = true, .extra = playerid);
WP_Hash(buf, sizeof (buf), inputtext);
if(strcmp(PlayerInfo[playerid][pPassword], buf, true))
{
SendClientMessage(playerid, Green, "Logged");
}
else
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Account", "Login to your account\n\nWrong password\n\nEnter your password:", "Login", "Quit");
}
printf("Password: %s | %s", buf, inputtext);
return 1;
}
}