11.07.2015, 22:45
Always use debugs on this cases, printf
Try to debug both the hashed inputtext and player password, if they are not the same it means that something wrong.
Also, You need to use strcmp in comparing strings not == you're not comparing integers.
Try to debug both the hashed inputtext and player password, if they are not the same it means that something wrong.
Also, You need to use strcmp in comparing strings not == you're not comparing integers.
pawn Код:
if (response)
{
if( !strcmp(udb_hash(inputtext) ) , PlayerInfo[playerid][pPass] ) && strlen(inputtext) > 0)
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
SendClientMessage(playerid, -1, "You Have Been Succesfully Logged In.");
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","You have entered an incorrect password.\nType your password below to login.","Login","Quit");
}
return 1;
}