10.02.2018, 08:49
Hi guys,
I'm making an UCP and i have problems with login.My password are wrritten in next way(On SA-MP Server)
I need help,how to make check for udb_hash on website(PHP).I'm beggginer for it
How to check is password good
But it don't will work.I need check with udb_hash ...
I'm making an UCP and i have problems with login.My password are wrritten in next way(On SA-MP Server)
Код:
PlayerInfo[playerid][pPass] = udb_hash(inputtext);
Код:
stock udb_hash(buf[]) //HASH PASS { new length=strlen(buf); new s1 = 1; new s2 = 0; new n; for (n=0; n<length; n++) { s1 = (s1 + buf[n]) % 65521; s2 = (s2 + s1) % 65521; } return (s2 << 16) + s1; }
Код:
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass]) //password check
How to check is password good
Код:
$acc = $Db->getRow("SELECT * FROM accounts WHERE p_email = '".$email."' AND p_password = '".$pass."' ");