Converting strings
#3

like this?
pawn Код:
/*Credits to Dracoblue*/
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;
}
Copied from Kush's y_ini tutorial
Reply


Messages In This Thread
Converting strings - by IgrexolonO - 10.06.2013, 21:28
Re: Converting strings - by Scenario - 10.06.2013, 21:54
Re: Converting strings - by rpg894 - 10.06.2013, 21:57
Re: Converting strings - by IgrexolonO - 11.06.2013, 06:11

Forum Jump:


Users browsing this thread: 1 Guest(s)