if(pickupid == bank) { ShowPlayerDialog (playerid, DIALOG_BANK, DIALOG_STYLE_LIST, "Bank", "Deposit - control \nWithdraw - Remove \nBalance - Balance " , "Cancel" , "Select " ) ; return 1; }
if (dialogid == DIALOG_BANK) { if ( ! response ) return 0; if ( response ) { switch (listitem) { case 1: ShowPlayerDialog (playerid, DIALOG_DEPOSIT, DIALOG_STYLE_INPUT, "Deposit", " Please enter the amount " , "Cancel" , " control " ) ; case 2: ShowPlayerDialog (playerid, DIALOG_WITHDRAW, DIALOG_STYLE_INPUT, "Withdraw", " Please enter the amount " , "Cancel" , " pull " ) ; case 3 : { format (szString, 50, "Your Balance:% d", PlayerInfo [playerid] [pBankAccount]); ShowPlayerDialog (playerid, 123, DIALOG_STYLE_MSGBOX, "Balance", szString, " Cancel" , "OK " ) ; } } } } if (dialogid == DIALOG_DEPOSIT) { if ( ! response ) return 0; if ( response ) { if (! strlen (inputtext)) return ShowPlayerDialog (playerid, DIALOG_DEPOSIT, DIALOG_STYLE_INPUT, "Deposit", " Please enter the amount " , "Cancel" , " control " ) ; if (GetPlayerMoney (playerid) <strval (inputtext)) return ShowPlayerDialog (playerid, DIALOG_DEPOSIT, DIALOG_STYLE_INPUT, "Deposit", " you do not have the amount requested , please type a new amount " , "Cancel" , " control " ) ; format (szString, 256, " You can deposit up to % d", MAX_DEPOSIT); if (strval (inputtext)> MAX_DEPOSIT) return ShowPlayerDialog (playerid, DIALOG_DEPOSIT, DIALOG_STYLE_INPUT, "Deposit", szString, " Cancel" , " control " ) ; GivePlayerMoney (playerid,-strval (inputtext)); PlayerInfo[playerid][pBankAccount] += strval(inputtext); SendClientMessage (playerid, -1, " Deposition successfully " ) ; } } if (dialogid == DIALOG_WITHDRAW && response) { if ( ! response ) return 0; if ( response ) { if (! strlen (inputtext)) return ShowPlayerDialog (playerid, DIALOG_WITHDRAW, DIALOG_STYLE_INPUT, "Withdraw", " Please enter the amount " , "Cancel" , " pull " ) ; if(PlayerInfo[playerid][pBankAccount]>=strval(inputtext))return ShowPlayerDialog(playerid, DIALOG_WITHDRAW, DIALOG_STYLE_INPUT, "Withdraw", "you do not have the amount requested , please type a new amount", "Cancel", "pull " ) ; format (szString, 256, " You can pull up to % d", MAX_WITHDRAW); if (strval (inputtext)> MAX_WITHDRAW) return ShowPlayerDialog (playerid, DIALOG_WITHDRAW, DIALOG_STYLE_INPUT, "Deposit", szString, " Cancel" , " pull " ) ; GivePlayerMoney (playerid, strval (inputtext)); PlayerInfo [playerid] [pBankAccount]-= strval (inputtext); SendClientMessage (playerid, -1, " You pulled successfully " ) ; } }
"Deposit - control \nWithdraw - Remove \nBalance - Balance " , "Cancel" , "Select "
//Deposit - 0
//Withdraw - 1
//Balance - 2
//Cancel - response
//Select - !response
switch (listitem)
{
case 1: ShowPlayerDialog (playerid, DIALOG_DEPOSIT, DIALOG_STYLE_INPUT, "Deposit", " Please enter the amount " , "Cancel" , " control " ) ;
case 2: ShowPlayerDialog (playerid, DIALOG_WITHDRAW, DIALOG_STYLE_INPUT, "Withdraw", " Please enter the amount " , "Cancel" , " pull " ) ;
case 3 :
{
format (szString, 50, "Your Balance:% d", PlayerInfo [playerid] [pBankAccount]);
ShowPlayerDialog (playerid, 123, DIALOG_STYLE_MSGBOX, "Balance", szString, " Cancel" , "OK " ) ;
}
}
if (dialogid == DIALOG_BANK) { if ( ! response ) return 0; if ( response ) { switch (listitem) { case 0: ShowPlayerDialog (playerid, DIALOG_DEPOSIT, DIALOG_STYLE_INPUT, "Deposit", " Please enter the amount " , "Cancel" , " control " ) ; case 1: ShowPlayerDialog (playerid, DIALOG_WITHDRAW, DIALOG_STYLE_INPUT, "Withdraw", " Please enter the amount " , "Cancel" , " pull " ) ; case 2 : { format (szString, 50, "Your Balance:% d", PlayerInfo [playerid] [pBankAccount]); ShowPlayerDialog (playerid, 123, DIALOG_STYLE_MSGBOX, "Balance", szString, " Cancel" , "OK " ) ; } } } }
still doesn't respond ;/
if i select for ex. withdraw or deposit it doesnt show any dialog at all |
ShowPlayerDialog (playerid, DIALOG_BANK, DIALOG_STYLE_LIST, "Bank", "Deposit - control \nWithdraw - Remove \nBalance - Balance " , "Cancel" , "Select " ) ;
button1[] The text on the left button. button2[] The text on the right button. Leave it blank ( "" ) to hide it.
if ( ! response ) return 0;
ShowPlayerDialog (playerid, DIALOG_BANK, DIALOG_STYLE_LIST, "Bank", "Deposit - control \nWithdraw - Remove \nBalance - Balance " , "Select" , "Cancel " ) ;
// button 1 and 2 , "Select" , "Cancel "
if (dialogid == DIALOG_BANK)
{
if ( ! response ) return 1;
if ( response )
{
switch (listitem)
{
case 1: ShowPlayerDialog (playerid, DIALOG_DEPOSIT, DIALOG_STYLE_INPUT, "Deposit", " Please enter the amount " , "Cancel" , " control " ) ;
case 2: ShowPlayerDialog (playerid, DIALOG_WITHDRAW, DIALOG_STYLE_INPUT, "Withdraw", " Please enter the amount " , "Cancel" , " pull " ) ;
case 3 :
{
format (szString, 50, "Your Balance:% d", PlayerInfo [playerid] [pBankAccount]);
ShowPlayerDialog (playerid, 123, DIALOG_STYLE_MSGBOX, "Balance", szString, " Cancel" , "OK " );
return 1;
}
}
}
}
if (dialogid == DIALOG_DEPOSIT)
{
if ( ! response ) return 1;
if ( response )
{
if (! strlen (inputtext)) return ShowPlayerDialog (playerid, DIALOG_DEPOSIT, DIALOG_STYLE_INPUT, "Deposit", " Please enter the amount " , "Cancel" , " control " ) ;
if (GetPlayerMoney (playerid) <strval (inputtext)) return ShowPlayerDialog (playerid, DIALOG_DEPOSIT, DIALOG_STYLE_INPUT, "Deposit", " you do not have the amount requested , please type a new amount " , "Cancel" , " control " ) ;
format (szString, 256, " You can deposit up to % d", MAX_DEPOSIT);
if (strval (inputtext)> MAX_DEPOSIT) return ShowPlayerDialog (playerid, DIALOG_DEPOSIT, DIALOG_STYLE_INPUT, "Deposit", szString, " Cancel" , " control " ) ;
GivePlayerMoney (playerid,-strval (inputtext));
PlayerInfo[playerid][pBankAccount] += strval(inputtext);
SendClientMessage (playerid, -1, " Deposition successfully " ) ;
return 1;
}
}
if (dialogid == DIALOG_WITHDRAW && response)
{
if ( ! response ) return 1;
if ( response )
{
if (! strlen (inputtext)) return ShowPlayerDialog (playerid, DIALOG_WITHDRAW, DIALOG_STYLE_INPUT, "Withdraw", " Please enter the amount " , "Cancel" , " pull " ) ;
if(PlayerInfo[playerid][pBankAccount]>=strval(inputtext))return ShowPlayerDialog(playerid, DIALOG_WITHDRAW, DIALOG_STYLE_INPUT, "Withdraw", "you do not have the amount requested , please type a new amount", "Cancel", "pull " ) ;
format (szString, 256, " You can pull up to % d", MAX_WITHDRAW);
if (strval (inputtext)> MAX_WITHDRAW) return ShowPlayerDialog (playerid, DIALOG_WITHDRAW, DIALOG_STYLE_INPUT, "Deposit", szString, " Cancel" , " pull " ) ;
GivePlayerMoney (playerid, strval (inputtext));
PlayerInfo [playerid] [pBankAccount]-= strval (inputtext);
SendClientMessage (playerid, -1, " You pulled successfully " ) ;
return 1;
}
}
if(pickupid == bank)
{
ShowPlayerDialog (playerid, DIALOG_BANK, DIALOG_STYLE_LIST, "Bank", "Deposit - control \nWithdraw - Remove \nBalance - Balance " , "Cancel" , "Select " ) ;
return 1;
}
//////////////////////////////
if (dialogid == DIALOG_BANK)
{
if ( response ) return 0;
if ( !response )
{
switch (listitem)
{
case 0: ShowPlayerDialog (playerid, DIALOG_DEPOSIT, DIALOG_STYLE_INPUT, "Deposit", " Please enter the amount " , "Cancel" , " control " ) ;
case 1: ShowPlayerDialog (playerid, DIALOG_WITHDRAW, DIALOG_STYLE_INPUT, "Withdraw", " Please enter the amount " , "Cancel" , " pull " ) ;
case 2:
{
format (szString, 50, "Your Balance:% d", PlayerInfo [playerid] [pBankAccount]);
ShowPlayerDialog (playerid, 123, DIALOG_STYLE_MSGBOX, "Balance", szString, " Cancel" , "OK " ) ;
}
}
}
}
if (dialogid == DIALOG_DEPOSIT)
{
if ( response ) return 0;
if ( !response )
{
if (! strlen (inputtext)) return ShowPlayerDialog (playerid, DIALOG_DEPOSIT, DIALOG_STYLE_INPUT, "Deposit", " Please enter the amount " , "Cancel" , " control " ) ;
if (GetPlayerMoney (playerid) <strval (inputtext)) return ShowPlayerDialog (playerid, DIALOG_DEPOSIT, DIALOG_STYLE_INPUT, "Deposit", " you do not have the amount requested , please type a new amount " , "Cancel" , " control " ) ;
format (szString, 256, " You can deposit up to % d", MAX_DEPOSIT);
if (strval (inputtext)> MAX_DEPOSIT) return ShowPlayerDialog (playerid, DIALOG_DEPOSIT, DIALOG_STYLE_INPUT, "Deposit", szString, " Cancel" , " control " ) ;
GivePlayerMoney (playerid,-strval (inputtext));
PlayerInfo[playerid][pBankAccount] += strval(inputtext);
SendClientMessage (playerid, -1, " Deposition successfully " ) ;
}
}
if (dialogid == DIALOG_WITHDRAW && response)
{
if ( response ) return 0;
if ( !response )
{
if (! strlen (inputtext)) return ShowPlayerDialog (playerid, DIALOG_WITHDRAW, DIALOG_STYLE_INPUT, "Withdraw", " Please enter the amount " , "Cancel" , " pull " ) ;
if(PlayerInfo[playerid][pBankAccount]>=strval(inputtext))return ShowPlayerDialog(playerid, DIALOG_WITHDRAW, DIALOG_STYLE_INPUT, "Withdraw", "you do not have the amount requested , please type a new amount", "Cancel", "pull " ) ;
format (szString, 256, " You can pull up to % d", MAX_WITHDRAW);
if (strval (inputtext)> MAX_WITHDRAW) return ShowPlayerDialog (playerid, DIALOG_WITHDRAW, DIALOG_STYLE_INPUT, "Deposit", szString, " Cancel" , " pull " ) ;
GivePlayerMoney (playerid, strval (inputtext));
PlayerInfo [playerid] [pBankAccount]-= strval (inputtext);
SendClientMessage (playerid, -1, " You pulled successfully " ) ;
}
}