16.07.2011, 22:15
He is using udbhash.
Give this a try:
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;
}