31.08.2013, 06:24
I'm using Y_INI, when I type the wrong password to my account it still logs me in.
I've tried every solution but nothing seems to work, I'm using whirlpool
I also tried if(!strcmp(hashpass, PlayerInfo[playerid][pPass], false))
All I want it to do is, if you insert the wrong password the dialog will popup again saying you've entered the wrong password.
I've tried every solution but nothing seems to work, I'm using whirlpool
I also tried if(!strcmp(hashpass, PlayerInfo[playerid][pPass], false))
All I want it to do is, if you insert the wrong password the dialog will popup again saying you've entered the wrong password.
pawn Код:
case DIALOG_LOGIN:
{
if (!response) return Kick(playerid);
if(response)
{
new hashpass[129];
WP_Hash(hashpass,sizeof(hashpass),inputtext);
if(!strcmp(inputtext, PlayerInfo[playerid][pPass], false))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
SendClientMessage(playerid,COLOR_WHITE,"{8EC7DC}[INFO] {FFFFFF}Your statistics have been restored!");
}
else
{
format(string, sizeof(string), "Before playing you must login\n\nUsername: %s\n\nEnter your password below and click login",PlayerName(playerid));
ShowPlayerDialog(playerid,DIALOG_LOGIN,3,"{EDDC57}Login required",string,"Login","Cancel");
CheckPasswordAttempts(playerid);
}
return 1;
}
}