Bank bug
#1

Hello, I use my bank as a mode I put the money into a bank and disconnect from the server and connect the money disappears and the other stores the statistics level / exp / money / warn


Код:
enum Info
{
  Bankas,
}
of registration
Код:
dini_IntSet(pFile, "Bankas", 0);
Bank code
Код:
	if(dialogid == 5)
	{
		if(response == 1)
	  {
 	    if(listitem == 0)
		  {
		    new moneys[128];
		    PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
		    format(moneys, sizeof(moneys), "BANK INFO: Bank account %d", PlayerData[playerid][Bankas]);
		    SendClientMessage(playerid, COLOR_RAUDONA, moneys);
		    GameTextForPlayer(playerid, moneys, 5000, 5);
		    ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Bank: Home", "Balance \nTake Money \nPlace Money", "Ok", "Cancel");
		  }
		  else if(listitem == 1)
      {
			  ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
		  }
		  else if(listitem == 2)
		  {
	      ShowPlayerDialog(playerid, 7,DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
  	 	}
		}
	}
  if(dialogid == 6)
	{
    if(response == 1)
    {
			if(listitem == 0)
			{
		    PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
		    if(10 >= PlayerData[playerid][Bankas])
				{
						SendClientMessage(playerid, COLOR_RAUDONA, "BANK INFO: You don't have enough money!");
						ShowPlayerDialog(playerid, 7,DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
				else
				{
					dini_IntSet(pFile, "Bankas", PlayerData[playerid][Bankas]-10);
				  GivePlayerMoney(playerid, 10);
	        PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				  new BankINF[256];
		  		format(BankINF, sizeof(BankINF), "BANK INFO: You took from bank 10 $ now your balance [ %d $ ]", PlayerData[playerid][Bankas]);
		  		SendClientMessage(playerid, COLOR_RAUDONA, BankINF);
		  		ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
			}
			else if(listitem == 1)
			{
				PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				if(100 >= PlayerData[playerid][Bankas])
				{
					SendClientMessage(playerid, COLOR_RAUDONA, "BANK INFO: You don't have enough money!");
					ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
				else
				{
					dini_IntSet(pFile, "Bankas", PlayerData[playerid][Bankas]-100);
				  GivePlayerMoney(playerid, 100);
				  PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				  new BankINF[256];
		  		format(BankINF, sizeof(BankINF), "BANK INFO: You took from bank 100 $ now your balance [ %d $ ]", PlayerData[playerid][Bankas]);
		  		SendClientMessage(playerid, COLOR_RAUDONA, BankINF);
		  		ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
			}
			else if(listitem == 2)
			{
				PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				if(1000 >= PlayerData[playerid][Bankas])
				{
					SendClientMessage(playerid, COLOR_RAUDONA, "BANK INFO: You don't have enough money!");
					ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
				else
				{
					dini_IntSet(pFile, "Bankas", PlayerData[playerid][Bankas]-1000);
				  GivePlayerMoney(playerid, 1000);
				  PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				  new BankINF[256];
	  			format(BankINF, sizeof(BankINF), "BANK INFO: You took from bank 1000 $ now your balance [ %d $ ]", PlayerData[playerid][Bankas]);
		  		SendClientMessage(playerid, COLOR_RAUDONA, BankINF);
		  		ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
			}
			else if(listitem == 3)
			{
				PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				if(10000 >= PlayerData[playerid][Bankas])
				{
  	      SendClientMessage(playerid, COLOR_RAUDONA, "BANK INFO: You don't have enough money!");
					ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
				else
				{
					dini_IntSet(pFile, "Bankas", PlayerData[playerid][Bankas]-10000);
				  GivePlayerMoney(playerid, 10000);
				  PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				  new BankINF[256];
	  			format(BankINF, sizeof(BankINF), "BANK INFO: You took from bank 10.000 $ now your balance [ %d $ ]", PlayerData[playerid][Bankas]);
		  		SendClientMessage(playerid, COLOR_RAUDONA, BankINF);
		  		ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
			}
			else if(listitem == 4)
			{
				PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				if(100000 >= PlayerData[playerid][Bankas])
				{
				  SendClientMessage(playerid, COLOR_RAUDONA, "BANK INFO: You don't have enough money!");
					ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
				else
				{
					dini_IntSet(pFile, "Bankas", PlayerData[playerid][Bankas]-100000);
				  GivePlayerMoney(playerid, 100000);
				  PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				  new BankINF[256];
	  			format(BankINF, sizeof(BankINF), "BANK INFO: You took from bank 100.000 $ now your balance [ %d $ ]", PlayerData[playerid][Bankas]);
		  		SendClientMessage(playerid, COLOR_RAUDONA, BankINF);
		  		ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
			}
			else if(listitem == 5)
			{
				PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				if(1000000 >= PlayerData[playerid][Bankas])
				{
					SendClientMessage(playerid, COLOR_RAUDONA, "BANK INFO: You don't have enough money!");
					ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
				else
				{
					dini_IntSet(pFile, "Bankas", PlayerData[playerid][Bankas]-1000000);
				  GivePlayerMoney(playerid, 1000000);
				  PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
	  		  new BankINF[256];
	  			format(BankINF, sizeof(BankINF), "BANK INFO: You took from bank 1.000.000 $ now your balance [ %d $ ]", PlayerData[playerid][Bankas]);
		  		SendClientMessage(playerid, COLOR_RAUDONA, BankINF);
		  		ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
			}
			else if(listitem == 6)
			{
		  	ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Bank: Home", "Balance \nTake Money \nPlace Money", "Ok", "Atљaukti");
			}
		}
	}
	if(dialogid == 7)
	{
    if(response == 1)
    {
			if(listitem == 0)
			{
				PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				if(10 >= GetPlayerMoney(playerid))
				{
			  	SendClientMessage(playerid, COLOR_RAUDONA, "BANK INFO: You don't have enough money!");
					ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
				else
				{
					dini_IntSet(pFile, "Bankas", PlayerData[playerid][Bankas]+10);
				  GivePlayerMoney(playerid, -10);
				  PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				  new BankINF[256];
		  		format(BankINF, sizeof(BankINF), "Bank: You placed in the bank 10 $ your money. [ %d $ ].", PlayerData[playerid][Bankas]);
		  		SendClientMessage(playerid, COLOR_RAUDONA, BankINF);
		  		ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "Bank: Place Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
			}
			else if(listitem == 1)
			{
				PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				if(100 >= GetPlayerMoney(playerid))
				{
		  		SendClientMessage(playerid, COLOR_RAUDONA, "BANK INFO: You don't have enough money!");
					ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
				else
				{
					dini_IntSet(pFile, "Bankas", PlayerData[playerid][Bankas]+100);
				  GivePlayerMoney(playerid, -100);
				  PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				  new BankINF[256];
		  		format(BankINF, sizeof(BankINF), "Bank: You placed in the bank 100 $ your money. [ %d $ ].", PlayerData[playerid][Bankas]);
		  		SendClientMessage(playerid, COLOR_RAUDONA, BankINF);
		  		ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "Bank: Place Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
			}
			else if(listitem == 2)
			{
				PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				if(1000 >= GetPlayerMoney(playerid))
				{
					SendClientMessage(playerid, COLOR_RAUDONA, "BANK INFO: You don't have enough money!");
					ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
				else
				{
					dini_IntSet(pFile, "Bankas", PlayerData[playerid][Bankas]+1000);
				  GivePlayerMoney(playerid, -1000);
				  PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				  new BankINF[256];
		  		format(BankINF, sizeof(BankINF), "Bank: You placed in the bank 1.000 $ your money. [ %d $ ].", PlayerData[playerid][Bankas]);
		  		SendClientMessage(playerid, COLOR_RAUDONA, BankINF);
		  		ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "Bank: Place Money", "10 LT \n100 LT \n1.000 LT \n10.000 LT \n100.000 LT \n1.000.000 LT \nBack", "Ok", "Cancel");
				}
			}
			else if(listitem == 3)
			{
				PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				if(10000 >= GetPlayerMoney(playerid))
				{
					SendClientMessage(playerid, COLOR_RAUDONA, "BANK INFO: You don't have enough money!");
					ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
				else
				{
					dini_IntSet(pFile, "Bankas", PlayerData[playerid][Bankas]+10000);
				  GivePlayerMoney(playerid, -10000);
				  PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				  new BankINF[256];
		  		format(BankINF, sizeof(BankINF), "Bank: You placed in the bank 10.000 $ your money. [ %d $ ].", PlayerData[playerid][Bankas]);
		  		SendClientMessage(playerid, COLOR_RAUDONA, BankINF);
		  		ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "Bank: Place Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
			}
			else if(listitem == 4)
			{
				PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				if(100000 >= GetPlayerMoney(playerid))
				{
				  SendClientMessage(playerid, COLOR_RAUDONA, "BANK INFO: You don't have enough money!");
					ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
				else
				{
					dini_IntSet(pFile, "Bankas", PlayerData[playerid][Bankas]+100000);
				  GivePlayerMoney(playerid, -100000);
				  PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				  new BankINF[256];
		  		format(BankINF, sizeof(BankINF), "Bank: You placed in the bank 100.000 $ your money. [ %d $ ].", PlayerData[playerid][Bankas]);
		  		SendClientMessage(playerid, COLOR_RAUDONA, BankINF);
		  		ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "Bank: Place Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
			}
			else if(listitem == 5)
			{
				PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				if(1000000 >= GetPlayerMoney(playerid))
				{
				  SendClientMessage(playerid, COLOR_RAUDONA, "BANK INFO: You don't have enough money!");
					ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Bank: Take Money", "10 $ \n100 $ \n1.000 $ \n10.000 $ \n100.000 $ \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
				else
				{
					dini_IntSet(pFile, "Bankas", PlayerData[playerid][Bankas]+1000000);
				  GivePlayerMoney(playerid, -1000000);
				  PlayerData[playerid][Bankas] = dini_Int(pFile, "Bankas");
				  new BankINF[256];
		  		format(BankINF, sizeof(BankINF), "Bankas: Bank: You placed in the bank 1.000.000 $ your money.[ %d $ ].", PlayerData[playerid][Bankas]);
		  		SendClientMessage(playerid, COLOR_RAUDONA, BankINF);
		  		ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "Bank: Place Money", "10 LT \n100 $ \n1.000 $ \n10.000 $ \n100.000 4 \n1.000.000 $ \nBack", "Ok", "Cancel");
				}
			}
			else if(listitem == 6)
			{
		  	ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Bank Home", "Balance \nTake Money \nPlace Money", "Ok", "Cancel");
			}
		}
  }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)