SA-MP Forums Archive
UCP hashed URGENT [+REP] - 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: UCP hashed URGENT [+REP] (/showthread.php?tid=622746)



UCP hashed URGENT [+REP] - XStreeter - 26.11.2016

Hello i founded an UCP online but password is not hashed (what you write that save)
can you tell me how can i change it to hashed password ? Thanks


Re: UCP hashed URGENT [+REP] - skaTim - 26.11.2016

Try this: https://sampforum.blast.hk/showthread.php?tid=570945


Re: UCP hashed URGENT [+REP] - BrianFaria - 26.11.2016

Put this stock


Код:
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;
}
And in the password code put this
udb_hash(params)

Also see this.