#1

Код:
case WITHDRAW_MENU:
	{
        if(response)
        if(!IsNumeric(inputtext)) return SendClientMessage(playerid, RED, "Characters detected, numbers only.");
		if(!strlen(inputtext)) return SendClientMessage(playerid, RED, "You need to enter an amount to withdraw."), ShowPlayerDialog(playerid, BANK_MENU, DIALOG_STYLE_LIST, "{FFFFFF}Las Venturas Bank - Main Menu", "{FFFFFF}Withdraw\nDeposit\nBalance\nTransfer\nCredit\nStatement", "Select", "Cancel");
		if(strval(inputtext) > BankInfo[playerid][Balance])
		{
		    SendClientMessage(playerid, RED, "Insufficient funds."), ShowPlayerDialog(playerid, BANK_MENU, DIALOG_STYLE_LIST, "{FFFFFF}Las Venturas Bank - Main Menu", "{FFFFFF}Withdraw\nDeposit\nBalance\nTransfer\nCredit\nStatement", "Select", "Cancel");
			return 1;
		}
		if(strval(inputtext) > 500000) return SendClientMessage(playerid, RED, "You can only withdraw $500k at a time");
		BankInfo[playerid][Balance] = BankInfo[playerid][Balance] - strval(inputtext);
		GivePlayerCash(playerid, strval(inputtext));
		format(fstr, sizeof(fstr), "You have withdrawn $%d from your bank account. New balance: $%d", strval(inputtext), BankInfo[playerid][Balance]);
		SendClientMessage(playerid, YELLOW, fstr);
		BankInfo[playerid][Transactions] = BankInfo[playerid][Transactions] + 1;
		BankInfo[playerid][Fees] = BankInfo[playerid][Fees] + 4;
		GivePlayerCash(playerid, - 4);
		SendClientMessage(playerid, RED, "FEE: You were charged a $4 fee for this transaction.");
		SendClientMessage(playerid, WHITE, "THANKYOU: Thank you for banking with Las Venturas Bank.");
		ShowPlayerDialog(playerid, BANK_MENU, DIALOG_STYLE_LIST, "{FFFFFF}Las Venturas Bank - Main Menu", "{FFFFFF}Withdraw\nDeposit\nBalance\nTransfer\nCredit\nStatement", "Select", "Cancel");
		new astring[100];
		format(astring, sizeof(astring), "%s [%d] has withdrawn $%d from their bank account", GetName(playerid), playerid, strval(inputtext));
		SendAdminMessage(GREY, astring);
	}

So i patched a bug today you can withdraw a random 15 number without having them in your bank account
you can withdraw money without you having them help please +rep
Reply
#2

you dont check what money player withdraw if he evens have them in his account?
Reply
#3

Im using nvcnr bank system


Quote:

case DEPOSIT_MENU:
{
if(response)
if(!IsNumeric(inputtext)) return SendClientMessage(playerid, RED, "Characters detected, numbers only.");
if(!strlen(inputtext)) return SendClientMessage(playerid, RED, "You need to enter an amount to deposit."), ShowPlayerDialog(playerid, BANK_MENU, DIALOG_STYLE_LIST, "{FFFFFF}Las Venturas Bank - Main Menu", "{FFFFFF}Withdraw\nDeposit\nBalance\nTransfer\nCre dit\nStatement", "Select", "Cancel");
if(strval(inputtext) > GetPlayerCash(playerid))
{
SendClientMessage(playerid, RED, "Insufficient funds."), ShowPlayerDialog(playerid, BANK_MENU, DIALOG_STYLE_LIST, "{FFFFFF}Las Venturas Bank - Main Menu", "{FFFFFF}Withdraw\nDeposit\nBalance\nTransfer\nCre dit\nStatement", "Select", "Cancel");
return 1;
}
if(strval(inputtext) > 10000000) return SendClientMessage(playerid, RED, "You can only deposit $10M at a time");
BankInfo[playerid][Balance] = BankInfo[playerid][Balance] + strval(inputtext);
GivePlayerCash(playerid, - strval(inputtext));
format(fstr, sizeof(fstr), "You have deposited $%d into your bank account. New balance: $%d", strval(inputtext), BankInfo[playerid][Balance]);
SendClientMessage(playerid, YELLOW, fstr);
BankInfo[playerid][Transactions] = BankInfo[playerid][Transactions] + 1;
BankInfo[playerid][Fees] = BankInfo[playerid][Fees] + 4;
GivePlayerCash(playerid, - 4);
SendClientMessage(playerid, RED, "FEE: You were charged a $4 fee for this transaction.");
SendClientMessage(playerid, WHITE, "THANKYOU: Thank you for banking with Las Venturas Bank.");
ShowPlayerDialog(playerid, BANK_MENU, DIALOG_STYLE_LIST, "{FFFFFF}Las Venturas Bank - Main Menu", "{FFFFFF}Withdraw\nDeposit\nBalance\nTransfer\nCre dit\nStatement", "Select", "Cancel");
new astring[100];
format(astring, sizeof(astring), "%s [%d] has deposited $%d into their bank account", GetName(playerid), playerid, strval(inputtext));
SendAdminMessage(GREY, astring);
}

Reply
#4

Anyy help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)