I tried to make a bank system all by myself. For now I only made the Register dialog, but whenever I try to register it won't save the password in the database
Code:
Code:
PHP Code:
case BankRegisterDialog:
{
if(Player[playerid][BankLogged] == 1)
{
if(strlen(inputtext) < 5)
{
SendClientMessage(playerid, COLOR_RED, "[ERROR] You password must be longer than 5 characters!");
return ShowPlayerDialog(playerid, BankRegisterDialog, DIALOG_STYLE_PASSWORD, "Bank Password", "Enter your desired password below:", "Register", "Cancel");
}
new query[100], name[24], query2[100];
GetPlayerName(playerid, name, 24);
WP_Hash(Player[playerid][BankPassword], 129, inputtext);
format(query, sizeof(query), "UPDATE 'accounts' SET 'Bankpassword' = '%s' WHERE 'Name' = '%s'", Player[playerid][BankPassword], name);
mysql_query(mysql, query);
}
}