02.01.2012, 03:42
Quote:
|
i will put it inside the Changepassword - OnDialogResponse?
|
pawn Код:
if(dialogid == DIALOG_CHANGEPASS)
{
new name[MAX_PLAYER_NAME],file[256],string[128];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVERFILE, name);
if(!response) return GameTextForPlayer(playerid,"~r~Changing Password Canceled...", 1500, 3);
if (!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_CHANGEPASS, DIALOG_STYLE_PASSWORD,""red"Changing Password Failed",""red"You put a empty pass in the blank\n"green"Please make sure you field the blank\nwith your new password","Change","Cancel");
if(inputtext == dini_Int(file,"Password")) return SendClientMessage(playerid,red,"You cannot keep the same password again!");
format(string, 128, "You succesfully change your password, your new password is %s",inputtext);
SendClientMessage(playerid, COLOR_GREEN, string);
dini_IntSet(file, "Password", udb_hash(inputtext));
}


