01.02.2011, 01:51
pawn Код:
dcmd_changepass(playerid, params[])
{
new FileL[68];
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name , sizeof(Name));
format(FileL, sizeof(FileL), SERVER_USER_FILE, Name);
new OldPass, NewPass;
OldPass = dini_Int(FileL, "Password");
if(sscanf(params, "ss", OldPass, NewPass)) return SendClientMessage(playerid, COLOR_USAGE, "USAGE: /changepass (password) (new password)");
else if(OldPass == NewPass) return SendClientMessage(playerid, COLOR_USAGE, "ERROR: You typed same password");
{
dini_IntSet(FileL, "Password", udb_hash(NewPass)); //error 035: argument type mismatch (argument 1)
SendClientMessage(playerid, COLOR_BLUE, "You have changed your password.");
return 1;
}
}