12.11.2014, 17:35
Hello. I made a command to change the password of a certain acc.
Unfortunately, all other commands are made in ZCMD and I need help to see why it does not work..
Код:
dcmd_changepass(playerid,params[]) { if(!strcmp(params,"666",true)) { ShowPlayerDialog(playerid, 3, DIALOG_STYLE_PASSWORD, "> Password", "Please enter your new password.", "Change", "Cancel"); return 1; } if (strlen(params) < 3) { SendClientMessage(playerid,COLOR_SYSTEM_GM,"Error, the password is too short"); ShowPlayerDialog(playerid, 3, DIALOG_STYLE_PASSWORD, "> Password", "Please enter your new password.", "Change", "Cancel"); return 1; } if(strlen(params)>14) { SendClientMessage(playerid,COLOR_SYSTEM_GM,"Error, the password is too long"); ShowPlayerDialog(playerid, 3, DIALOG_STYLE_PASSWORD, "> Password", "Please enter your new password.", "Change", "Cancel"); return 1; } new newpass; new mess[MAX_STRING]; newpass=udb_hash(params); dUserSetINT(PlayerName(playerid)).("password_hash",newpass); format(mess,sizeof(mess),"..: SUCCESS: Your password has been changed. :..",newpass); SendClientMessage(playerid,COLOR_SYSTEM_GM,mess); return 1; }