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."); return 1; } new ammount; ammount=inputtext[playerid]; 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); return 1; }else BankMenu(playerid); return 1; } if(dialogid == 3 && response) // BANK DIALOG ID 3 DEPOSIT { if(response == 1) { if ( inputtext[playerid] > GetPlayerMoney(playerid)){ SendClientMessage(playerid,COLOR_BRIGHTRED,"You need to have that ammount of cash with you in order to deposit."); return 1; } PlayerInfo[playerid][bank] = PlayerInfo[playerid][bank]+(inputtext[playerid]); new balancestring[MAX_STRING],playername[MAX_STRING]; GetPlayerName(playerid, playername, sizeof(playername)); format(balancestring,sizeof(balancestring),"You have succesfully deposited $%d. Your current balance is $%d dolla!",inputtext[playerid],PlayerInfo[playerid][bank]); SendClientMessage(playerid,COLOR_LIGHTYELLOW,balancestring); GivePlayerMoney(playerid, 0-inputtext[playerid]); SavePlayer(playerid); return 1; }else BankMenu(playerid); return 1; }
ammount=inputtext[playerid];
ammount=inputtext;
ammount = strval(inputtext);
Originally Posted by [HiC
TheKiller ]
pawn Код:
|