Bank menu doesnt work properly when many bots are on?
#1

How come?

If i have 0 bots it works properly, if i have 1 bot, it works properly (so is not an id 0 issue), but then when i have let's say 9 bots, it doesnt work?

Posting the bank menu and withdraw function:
Код:
stock BankMenu(playerid)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "                       $ THE DOLLA BANK $", "Withdraw\nDeposit\nBalance", "Accept", "Cancel");
return 1;
}

stock Withdraw(playerid)
{
if(PlayerInfo[playerid][logged] == 1) {
	new loginmsga[MAX_STRING],playername[MAX_STRING],fname[MAX_STRING];
	GetPlayerName(playerid, playername, sizeof(playername));
	format(fname,sizeof(fname),P_FILE,udb_encode(playername));
	format(loginmsga,sizeof(loginmsga),"Welcome to the The Dolla Bank %s! \nPlease select the ammount you wish to withdraw. \nYour current balance is $%d dolla.",playername,PlayerInfo[playerid][bank]);
	return ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"24/7 ATM Machine",loginmsga,"Withdraw","Cancel");

 }else SendClientMessage(playerid,COLOR_BRIGHTRED,"You must be logged in to use the Banking features.");
 InBank[playerid]=0;

 return 1;
}

/// ON DIALOG RESPONSE WITHDRAW PART
Код:
    if(dialogid == 2 && response) // BANK DIALOG ID 2 WITHDRAW
  	{
    	if(response == 1) {
        if ( inputtext[playerid] > PlayerInfo[playerid][bank]){
        SendClientMessage(playerid,COLOR_BRIGHTRED,"You don't have that much money in your bank account.");
        InBank[playerid]=0;
				return 1;
        }
			new ammount;
			ammount = strval(inputtext);
			PlayerInfo[playerid][bank] = PlayerInfo[playerid][bank]-ammount;
      new balancestring[MAX_STRING],playername[MAX_STRING];
			GetPlayerName(playerid, playername, sizeof(playername));
      format(balancestring,sizeof(balancestring),"You have succesfully withdrawn $%d. Your current balance is $%d dolla!",ammount,PlayerInfo[playerid][bank]);
      SendClientMessage(playerid,COLOR_LIGHTYELLOW,balancestring);
      GivePlayerMoney(playerid, 0+ammount);
      SavePlayer(playerid);
      InBank[playerid]=0;
      return 1;

			}else
			BankMenu(playerid);
      return 1;
		}
Reply


Messages In This Thread
Bank menu doesnt work properly when many bots are on? - by aNdReSkKkK - 08.02.2010, 04:40

Forum Jump:


Users browsing this thread: 1 Guest(s)