[HELP]whirlpool
#5

Yes I realise that, what I'm saying is that he is trying to compare an integer with a string rather than a string with a string.

pawn Код:
stock udb_CheckLogin(nickname[], pwd[])
{
    new fname[MAX_STRING], hashpass[129];
    WP_Hash(hashpass, sizeof(hashpass), pwd);
    format(fname, sizeof(fname), "SFTDM/Users/%s.sav", udb_encode(nickname));
    if(!strcmp(udb_User(nickname, "password_hash"), hashpass, false)) return true;
    return false;
}


stock udb_Create(nickname[], pwd[])
{
    if (udb_Exists(nickname)) return false;
    new fname[MAX_STRING], hashpass[129];
    WP_Hash(hashpass, sizeof(hashpass), pwd);
    format(fname, sizeof(fname), "SFTDM/Users/%s.sav", udb_encode(nickname));
    dini_Create(fname);
    udb_UserSet(nickname, "password_hash", hashpass);
    return true;
}
Not much knowledge of udb once again, but this is my attempt.
Reply


Messages In This Thread
[HELP]whirlpool - by KillerStrike23 - 07.07.2014, 21:57
Re : [HELP]whirlpool - by S4t3K - 07.07.2014, 23:20
Re: [HELP]whirlpool - by Threshold - 07.07.2014, 23:27
Re : [HELP]whirlpool - by S4t3K - 07.07.2014, 23:29
Re: [HELP]whirlpool - by Threshold - 07.07.2014, 23:33

Forum Jump:


Users browsing this thread: 3 Guest(s)