[Help] Password change.
#2

I believe you need a place for it to save, an accountpath

pawn Код:
if(sscanf(params, "ss", oldpass, newpass)) SendUsage(playerid, "USAGE: /changepass [old password] [new password]");
    else
    {
        new accountpath[64]; format(accountpath, sizeof(accountpath), "%s", AccountPath(playerid));
        new buf[129];
        WP_Hash(buf, sizeof(buf), oldpass);
        if(strcmp(dini_Get(accountpath, "password"), oldpass, true) == 0)
        {
            WP_Hash(buf, sizeof(buf), newpass);
            dini_Set(accountpath, "password", newpass);
            SendClientMessage(playerid, COLOR_GREEN, "SUCCESS: You have changed your password.");
        }
Reply


Messages In This Thread
[Help] Password change. - by Rocketeer - 31.01.2011, 22:54
Re: [Help] Password change. - by David5290 - 31.01.2011, 23:26
Re: [Help] Password change. - by Rocketeer - 31.01.2011, 23:47

Forum Jump:


Users browsing this thread: 1 Guest(s)