From 0009c38ffcc7db87bc038fbd35de277ed813e694 Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Sun, 14 Oct 2018 20:15:28 +1100 Subject: [PATCH] Type MAX/ALL in the deposit/withdraw to all --- gamemodes/sf-cnr.pwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index 1959e00..3179dbb 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -10617,6 +10617,7 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this while you're in jail." ); if (response) { + if ( strmatch( inputtext, "MAX" ) || strmatch( inputtext, "ALL" ) ) format( inputtext, 16, "%d", p_BankMoney[ playerid ] ); if (!strlen(inputtext)) { format( Query, sizeof( Query ), "{FFFFFF}Enter the amount that you are willing to withdraw from your bank account.\n\n"COL_RED"Invalid amount entered!\n\n"COL_GREY"Current Balance:"COL_WHITE" %s", cash_format( p_BankMoney[ playerid ] ) ); @@ -10649,6 +10650,7 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) { if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this while you're in jail." ); if (response) { + if ( strmatch( inputtext, "MAX" ) || strmatch( inputtext, "ALL" ) ) format( inputtext, 16, "%d", GetPlayerCash( playerid ) ); if (!strlen(inputtext)) { format( Query, sizeof( Query ), "{FFFFFF}Enter the amount that you are willing to deposit into your bank account below.\n\n"COL_RED"Invalid amount entered!\n\n"COL_GREY"Current Balance:"COL_WHITE" %s", cash_format( p_BankMoney[ playerid ] ) ); ShowPlayerDialog(playerid, DIALOG_BANK_DEPOSIT, DIALOG_STYLE_INPUT, "{FFFFFF}Personal Account", Query, "Deposit", "Back");