#1

Fixed!
Reply
#2

First of all, this is how you can get a value from PVar-string:
pawn Код:
new uname[64];
GetPVarString(playerid,"Username",uname,sizeof(uname)); // now `uname` contains PVar `Username`
And what are you trying to do with this line:
pawn Код:
format(Rstr, sizeof(Rstr), BankFile, GetPVarString(playerid, "Username"));
what's a `BankFile` and what's supposed to be in the Rstr variable?
Reply
#3

Fixed!
Reply
#4

Try this:
pawn Код:
case DIALOG_BANKCREATEPASS:
        {
            if(response) {
                new Rstr[128], name[64], buf[129];
                GetPVarString(playerid, "Username", name, sizeof(name));
             //   format(Rstr, sizeof(Rstr), BankFile, name);
                WP_Hash(buf, sizeof(buf), inputtext);
             //   dini_Set(Rstr, "Password", buf);
                dini_Set(name, "Password", buf);  // I've added this line
                SendClientMessage(playerid, COLOR_GREEN, "You have successfully registered your bank account");
                BankSettings[playerid][BANK_REGISTERED] = 1;
                return ShowPlayerDialog(playerid, DIALOG_BANKSETTINGS, DIALOG_STYLE_LIST, "{FFFF00}Account Settings", "Balance\nWithdraw\nDeposit\nTransfer\nChange Account Password\nDelete Account", "Ok", "Back");
            }
        }
Reply
#5

Quote:
Originally Posted by Norck
Посмотреть сообщение
Try this:
pawn Код:
case DIALOG_BANKCREATEPASS:
        {
            if(response) {
                new Rstr[128], name[64], buf[129];
                GetPVarString(playerid, "Username", name, sizeof(name));
             //   format(Rstr, sizeof(Rstr), BankFile, name);
                WP_Hash(buf, sizeof(buf), inputtext);
             //   dini_Set(Rstr, "Password", buf);
                dini_Set(name, "Password", buf);  // I've added this line
                SendClientMessage(playerid, COLOR_GREEN, "You have successfully registered your bank account");
                BankSettings[playerid][BANK_REGISTERED] = 1;
                return ShowPlayerDialog(playerid, DIALOG_BANKSETTINGS, DIALOG_STYLE_LIST, "{FFFF00}Account Settings", "Balance\nWithdraw\nDeposit\nTransfer\nChange Account Password\nDelete Account", "Ok", "Back");
            }
        }
OMG! Thank you very much Norck. It works awesome with Create Bank Username and Password too.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)