18.01.2016, 12:17
when i use this code for change password given me [ERORR]:You have entered incorrect password.
how to fix it?
how to fix it?
Код:
CMD:changepass(playerid, params[]) { new pass1[128],pass2[128]; if(sscanf(params,"ii",pass1,pass2)) return SendClientMessage(playerid, COLOR_RED,CmdUsageText[50]); if(PlayerInfo[playerid][pPass2] != strval(pass1))return SendClientMessage(playerid, COLOR_RED,"[ERORR]:You have entered incorrect password."); new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Password",udb_hash(pass2)); INI_WriteInt(File,"Password2",strval(pass2)); INI_Close(File); new str[128]; format(str, sizeof(str), "You have change your password to %d", pass2); SendClientMessage(playerid, COLOR_BLUE,str); return 1; }