11.06.2013, 17:54
Just realized that I can't use concat as I need to rehash the password with the retrieved salt.
EDIT: This is the current code:
it's escaping the string then nothing (crash)
EDIT: This is the current code:
pawn Код:
public Mysql_Login(playerid, password[])
{
new rows, fields;
cache_get_data(rows, fields, Gconnection);
if(rows) {
new HashedPass[429], temp[100], Query[529];
mysql_real_escape_string(PlayerName(playerid), PlayerName(playerid), Gconnection);
cache_get_row(0, 37, temp);
format(HashedPass, 429, "%s%s", temp, password);
WP_Hash(HashedPass, 429, HashedPass);
mysql_function_query(Gconnection, Query, true, "OnPlayerRequestLogin", "ds", playerid, HashedPass);
}
return 1;
}