07.06.2010, 16:16
My problem is:
I've been trying to save a inputtext of a password for a later mysql query.
That's the inputtext I have to save for this part of the script:
Is there another way to store a string then SetPVarString and GetPVarString?
I've been trying to save a inputtext of a password for a later mysql query.
pawn Код:
if(dialogid == 600 && response)
{
format(stringsize, sizeof(stringsize), "SELECT * FROM "SQL_BANK" WHERE Password = '%s' LIMIT 1",inputtext);
mysql_query(stringsize, -1, -1, RegistrationSystemConnection);
mysql_store_result(RegistrationSystemConnection);
if(mysql_num_rows(RegistrationSystemConnection) > 0)
{
format(banksave,128,"%s",inputtext);
BankData[playerid][bLogged] = true;
SendClientMessage(playerid,COLOR_YELLOW,"You have logged into a bank account");
SetPVarString(playerid,"BankSavePass",banksave);
}
}
pawn Код:
{
new string2[128];
format(string,128,"UPDATE `bank` SET `Amount`='%s' WHERE `Password`='%s'",inputtext,GetPVarString(playerid,"BankSavePass",banksave,300));
mysql_query(string);
format(string2,128,"You deposited %s$ into the logged in bank account",inputtext);
SendClientMessage(playerid,COLOR_YELLOW,string2);
}