Change Password
#1

PHP код:
case DIALOG_CHANGEPS2:
        {
            if(
response)
            {
                if(!
strlen(inputtext)) // if nothing is entered in the dialog
                
{
                    
SendClientMessage(playeridRED"You must enter a password.");
                }
                new 
string[128];
                new 
hashpass[129]; // the whirlpool uses a 129 length string for hashing the password.
                
WP_Hash(hashpasssizeof(hashpass), inputtext); // to hash the input data
                
format(stringsizeof(string), "Your password is: %s"inputtext); // we have formatted a string to include variables inside it
                
SendClientMessage(playerid, -1string); // sending the above string message
                
new query[256];
                
WP_Hash(pData[playerid][Password], 129inputtext); //hashing inputtext
                
mysql_format(mysqlquerysizeof(query), "UPDATE `accounts` SET `Password`=%s WHERE `Username`='%s'",
                
pData[playerid][Password], Name[playerid]);
                 
mysql_tquery(mysqlquery"""");
                return 
1;
            }
        } 
command is working fine but password isnot saving nor i see any anything on mysql.log about this command.
Reply


Messages In This Thread
Change Password - by sscarface - 05.04.2017, 15:13
Re: Change Password - by GoldenLion - 05.04.2017, 15:15
Re: Change Password - by ISmokezU - 05.04.2017, 15:20
Re: Change Password - by sscarface - 06.04.2017, 12:00

Forum Jump:


Users browsing this thread: 1 Guest(s)