SA-MP Forums Archive
Little Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Little Problem (/showthread.php?tid=292335)



Little Problem - TheLonelyBeast - 23.10.2011

Hello all, i am using this register system https://sampforum.blast.hk/showthread.php?tid=273088 so it works great but in scriptfiles for pass it in numbers how can i change it into what they had really put. and i like i fall form building to kill myself and i check it again deaths has no increased of number. Pleas help Thanks


Re: Little Problem - Zonoya - 23.10.2011

it uses Hash remove the hash function and u will see the proper pass


Re: Little Problem - TheLonelyBeast - 23.10.2011

Ok i will keep this in mind thanks alot


Re: Little Problem - TheLonelyBeast - 23.10.2011

Look at this
Код:
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
INI_WriteInt(File,"Password",udb_hash(inputtext));
Код:
(297) : error 017: undefined symbol "udb_hash"
 (315) : error 017: undefined symbol "udb_hash"



Re: Little Problem - Zonoya - 23.10.2011

pawn Код:
if(inputtext) == PlayerInfo[playerid][pPass])
INI_WriteInt(File,"Password",strval(inputtext));
Should fix it


Re: Little Problem - .:Kaos:. - 23.10.2011

Did you remove the hash function? Or are you not using the include for it? Try adding this(If the reply above doesn't work)
Код:
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;
}



Re: Little Problem - TheLonelyBeast - 23.10.2011

Quote:
Originally Posted by .:Kaos:.
Посмотреть сообщение
Did you remove the has function? Or are you not using the include for it? Try adding this(If the reply above doesn't work)
Код:
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;
}
Yours worked and thanks for the help


Re: Little Problem - TheLonelyBeast - 23.10.2011

WTF. man last post before mine your ent work that the first thing i had i want to see the password in the scriptfile not no number


Re: Little Problem - .:Kaos:. - 23.10.2011

If you don't want your passwords to be safe, and it be text. Then use what Zonoya put.


Re: Little Problem - TheLonelyBeast - 23.10.2011

when i put his here the error's
Код:
 : error 033: array must be indexed (variable "inputtext")
 error 029: invalid expression, assumed zero
 : warning 215: expression has no effect
 error 001: expected token: ";", but found ")"
fatal error 107: too many error messages on one line
Line
Код:
if(inputtext) == PlayerInfo[playerid][pPass])