SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 08/02/2010, 05:40 AM   #1
aNdReSkKkK
Big Clucker
 
Join Date: Jan 2010
Posts: 70
Reputation: 0
Default Bank menu doesnt work properly when many bots are on?

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:
Code:
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
Code:
    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;
		}
aNdReSkKkK is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open Gate Command doesnt Work Properly [GM]The_Don Help Archive 4 07/02/2010 02:17 PM
DAMN IT DOESN'T WORK PROPERLY! stieben Help Archive 8 22/01/2010 03:08 PM
Bank doesnt work + exit point at house Chivava Help Archive 1 02/01/2010 12:41 AM
npc doesnt load bots? HydraX Help Archive 11 28/10/2009 10:48 PM
[SOLVED]Bank menu freeze command won't work, please help! [HT]playstation Help Archive 6 12/07/2009 12:36 PM


All times are GMT. The time now is 06:30 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.