04.02.2012, 18:40
pawn Код:
format(string, sizeof(string), "INSERT INTO Users (Name,Password) VALUES ('%s','%s')", APlayerData[playerid][Name], inputtext);
you would use your hashPassword to save it hashed because you did WP_Hash(hashPassword, 129, inputtext);
format(APlayerData[playerid][Password], 32, "%s", field[2]);
is how/where we store their password from the mysql stuff right?
and
WP_Hash(hashPassword, 129, inputtext);
is where we hash the password they typed
I surmise it would be something like this after you load it...
pawn Код:
if(!strcmp(hashedPassword, field[2], false)) //false being case sensitive
{
//we load their other stuff / log them in
}
else
{
//they got it wrong
}