Bank Errors
#1

So if a player has 0 money in the bank he can still withdraw unlimited money..same with deposit..

Code:
Код:
CMD:deposit(playerid, params[])
{
	if(IsPlayerInRangeOfPoint(playerid, 2, -2455.4519, 503.9336, 30.0781))
	{
	    if(GetPlayerMoney(playerid) < 0) return SendClientMessage(playerid, COLOR_RED, "ERROR:You don't have any money on you!");
	    new amount;
	    if(sscanf(params,"nd", amount)) return SendClientMessage(playerid, -1,"USAGE: /deposit [amount]");
	    GivePlayerMoney(playerid, -amount);
	    pInfo[playerid][Bank]++;
	}
	return 1;
}
CMD:withdraw(playerid, params[])
{
	if(IsPlayerInRangeOfPoint(playerid, 2, -2455.4519, 503.9336, 30.0781))
	{
	    if(pInfo[playerid][Bank] < 0) return SendClientMessage(playerid, COLOR_RED, "ERROR:You Don't Have Money In Your Bank Account!");
     	new amount;
    	if(sscanf(params,"nd", amount)) return SendClientMessage(playerid, -1,"USAGE: /withdraw [amount]");
    	GivePlayerMoney(playerid, amount);
    	pInfo[playerid][Bank]--;
	}
	return 1;
}
Reply


Messages In This Thread
Bank Errors - by TheKnown - 18.09.2015, 17:58
Re: Bank Errors - by Mister0 - 18.09.2015, 18:30
Re: Bank Errors - by nezo2001 - 18.09.2015, 19:01
Re: Bank Errors - by TheKnown - 18.09.2015, 19:06
Re: Bank Errors - by jlalt - 18.09.2015, 19:14
Re: Bank Errors - by Mister0 - 18.09.2015, 19:15
Re: Bank Errors - by TheKnown - 18.09.2015, 20:27
Re: Bank Errors - by Aliassassin123456 - 18.09.2015, 20:41
Re: Bank Errors - by TheKnown - 18.09.2015, 21:00
Re: Bank Errors - by Aliassassin123456 - 18.09.2015, 21:10

Forum Jump:


Users browsing this thread: 1 Guest(s)