07.01.2019, 10:38
Quote:
How are you calling BCrypt? It probably isn't passing the playerid to the callback.
|
pawn Code:
Dialog:DIALOG_LOGIN(playerid, response, listitem, inputtext[])
{
if(response)
{
new query[500], Password[BCRYPT_HASH_LENGTH];
mysql_format(Database, query, sizeof(query), "SELECT `Password` FROM `players` WHERE `Username` = '%e'", GetName(playerid));
mysql_query(Database, query);
cache_get_value_name(0, "Password", Password, BCRYPT_HASH_LENGTH);
bcrypt_check(inputtext, Password, "OnPasswordChecked", "i", playerid);
}
else
return Kick(playerid);
return 1;
}