18.10.2014, 13:49
(
Последний раз редактировалось Edw; 26.10.2014 в 17:40.
)
Fixed.
if(strcmp(udb_hash(inputtext), PlayerInfo[playerid][pPass], true)== 0)
Wouldn't work. UBD hash is converted from a string to a number.
|
stock udb_hash(buf[]) {
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;
}