02.12.2011, 19:10
Hi all 
I have a little bug with my bank system
So, when I or my friend deposit money to me it takes money from his account (How much money hi choose, so much will take) but it will take for me to :S
it seams that ID's are bugged

I have a little bug with my bank system
So, when I or my friend deposit money to me it takes money from his account (How much money hi choose, so much will take) but it will take for me to :S
it seams that ID's are bugged
pawn Code:
case 3506:
{
if(!response) return ShowPlayerDialog(playerid, 3501, DIALOG_STYLE_LIST, " Your Account", "Money\nDesposit\nDeposit to player\nWithdraw", "Ok", "Exit");
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 3506, DIALOG_STYLE_INPUT, " Money to deposit", "How much money you want give?", "Ok", "Exit");
if(!IsPlayerConnected(GetPVarInt(playerid, "DepositID")))
{
SendClientMessage(playerid, COLOR_KRED, "Player went offline!");
ShowPlayerDialog(playerid, 3501, DIALOG_STYLE_LIST, " Your Account", "Money\nDesposit\nDeposit to player\nWithdraw", "Ok", "Exit");
}
if(BankInfo[playerid][bkMoney] > strval(inputtext))
{
new bkstring2[128], BQuery2[400];
format(bkstring, sizeof(bkstring), "You deposit $%d on %s account!", strval(inputtext), GetName(GetPVarInt(playerid, "DepositID")));
SendClientMessage(playerid, COLOR_YELLOW, bkstring);
format(bkstring2, sizeof(bkstring), "%s has deposit $%d on your account!", GetName(playerid), strval(inputtext));
SendClientMessage(GetPVarInt(playerid, "DepositID"), COLOR_LIME, bkstring2);
BankInfo[playerid][bkMoney] -= strval(inputtext);
BankInfo[GetPVarInt(playerid, "DepositID")][bkMoney] += strval(inputtext);
printf("Pare: %d", BankInfo[GetPVarInt(playerid, "DepositID")][bkMoney]);
format(BQuery, sizeof(BQuery), "UPDATE `bank` SET `Money` = %d WHERE `User` = '%s'", BankInfo[playerid][bkMoney], GetName(playerid));
mysql_query(BQuery);
format(BQuery2, sizeof(BQuery2), "UPDATE `bank` SET `Money` = %d WHERE `User` = '%s'", BankInfo[GetPVarInt(playerid, "DepositID")][bkMoney], GetName(GetPVarInt(playerid, "DepositID")));
mysql_query(BQuery2);
}
else
{
SendClientMessage(playerid, COLOR_KRED, "You don't have enough money on your account!");
ShowPlayerDialog(playerid, 3506, DIALOG_STYLE_INPUT, " Money to deposit", "How much money you want give?", "Ok", "Exit");
}
}