08.07.2013, 03:20
Hello,
I created a command which allows a user to change his account password. The problem is that, when he entered the password in the dialog, and hit 'Change', the password doesn't change, is still the same.
Here's the change password dialog
I created a command which allows a user to change his account password. The problem is that, when he entered the password in the dialog, and hit 'Change', the password doesn't change, is still the same.
Here's the change password dialog
pawn Код:
case DIALOG_PASSWORDCHANGE:
{
if(!response) return SendClientMessage(playerid, COLOR_RED, "* You cancelled this operation");
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_PASSWORDCHANGE, DIALOG_STYLE_PASSWORD,"Password manager","Please type your new password:","Done","Cancel");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_Close(File);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Password changed!","Close","");
}
}