MySQL CreateAccount
#1

How to replace it with MD5_Hash on WP_Hash?
Код:
MySQL_CreateAccount(playerid, pass[])
{
        if(!MYSQL_ON) return 0;
	
        new query[256];
        new password[64];
        format(password, 64, "%s", MD5_Hash(pass));
        format(g_SQL, query, sizeof(query), "INSERT INTO `accounts` (`Nickname`, `Key`) VALUES ('%s', '%s')", GetNick(playerid), password);
	mysql_query(g_SQL, query);
	return 1;
}
Код:
new buff[129];
WP_Hash(buff, 129, inputtext);
if(strcmp(PlayerInfo[playerid][pKey], buff, true) == 0)
WP_Hash(PlayerInfo[playerid][pKey], 129, inputtext);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)