08.03.2017, 11:02
Код:
CMD:changepass(playerid, params[]) { if(IsPlayerConnected(playerid)) { ShowPlayerDialog(playerid, 335, DIALOG_STYLE_PASSWORD, "Password", "Write current password", "Ok", Eexit"); } return 1; }
Код:
fDialog(335) { if(response) { if(PlayerInfo[playerid][pPassword] == udb_hash(inputtext)) { ShowPlayerDialog(playerid, 342, DIALOG_STYLE_PASSWORD, "Password", "Write new password", "Ok", "Exit"); } else { ShowPlayerDialog(playerid, 335, DIALOG_STYLE_PASSWORD, "Password", "Write current password", "Ok", Eexit"); } } return 1; }
Код:
fDialog(342) { if(response) { new string[69]; if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 342, DIALOG_STYLE_PASSWORD, "Password", "Write current password", "Ok", Eexit"); if(strlen(inputtext) < 6 || strlen(inputtext) > 20) return ShowPlayerDialog(playerid, 342, DIALOG_STYLE_PASSWORD, "Password", "Write current password", "Ok", Eexit"); if(strfind(inputtext, "%") != -1) return ShowPlayerDialog(playerid, 342, DIALOG_STYLE_PASSWORD, "Password", "Write current password", "Ok", Eexit"); PlayerInfo[playerid][pPassword] = udb_hash(inputtext); //strmid(PlayerInfo[playerid][pPassword], inputtext, 0, strlen(inputtext), 255); format(string, sizeof(string), "New password is %s", inputtext); SCM(playerid, COLOR_WHITE,string); } return 1; }
Код:
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 342, DIALOG_STYLE_PASSWORD, "Password", "Write current password", "Ok", Eexit"); Not functioning, press empty dialog it accepts