27.10.2012, 04:11
Try this maybe?
You are comparing pPass to the player's inputtext. Did you format the pPass variable with the player's password?
pawn Код:
if(dialogid == L_DIALOG)
{
if(!response) return Kick(playerid);
else if(response)
{
new HashPass[129];
WP_Hash(HashPass, sizeof(HashPass), inputtext);
INI_ParseFile(UserAccount(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
if(!strcmp(PlayerInfo [ playerid ] [ pPass ] , HashPass , true ))
{
INI_ParseFile(UserAccount(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]);
SetPlayerScore(playerid, PlayerInfo[playerid][pScores]);
}
else
{
ShowPlayerDialog(playerid, L_DIALOG, DIALOG_STYLE_PASSWORD,""cwhite"Login",""cred"You have entered an incorrect password.\n"cwhite"Type your password below to login.","Login","");
}
}
}
return 1;
}