/changepass problem
#7

He is using udbhash.

Give this a try:

pawn Код:
CMD:changepass(playerid, params[])
{
    new file[128];
    format(file, 128, USER_FILE, GetPName(playerid));
    new OldPass[80], NewPass[80];

    if(sscanf(params, "ss", OldPass, NewPass)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /changepass (password) (new password)");
    if(udb_hash(OldPass) != udb_hash(dini_Int(file, "Password"))) return SendClientMessage(playerid, COLOR_RED, "ERROR: Your old password does not match!");
    if(udb_hash(OldPass) == udb_hash(NewPass)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You typed same password");

    dini_IntSet(file, "Password", udb_hash(NewPass));
    SendClientMessage(playerid, COLOR_RED, "You have changed your password.");
    return 1;
}
Reply


Messages In This Thread
/changepass problem - by Amine_Mejrhirrou - 16.07.2011, 21:25
Re: /changepass problem - by Vince - 16.07.2011, 21:32
Re : /changepass problem - by Amine_Mejrhirrou - 16.07.2011, 21:40
Re: Re : /changepass problem - by Kyosaur - 16.07.2011, 21:50
Re : Re: Re : /changepass problem - by Amine_Mejrhirrou - 16.07.2011, 21:56
Re: /changepass problem - by Kyosaur - 16.07.2011, 22:07
Re: /changepass problem - by PotH3Ad - 16.07.2011, 22:15
Re : /changepass problem - by Amine_Mejrhirrou - 16.07.2011, 23:16

Forum Jump:


Users browsing this thread: 1 Guest(s)