Bank Errors
#8

What about this one?:

PHP код:
CMD:deposit(playeridparams[])
{
    if(
IsPlayerInRangeOfPoint(playerid2, -2455.4519503.933630.0781))
    {
        new 
amount;
        if(
sscanf(params"d"amount)) return SendClientMessage(playerid, -1"USAGE: /deposit [amount]");
        if(
GetPlayerMoney(playerid) < amount || amount 1) return SendClientMessage(playerid, -1"Error: You haven't that much money or invalid amount.");
        
GivePlayerMoney(playerid, -amount);
        
pInfo[playerid][Bank] += amount;
    }
    return 
1;
}
CMD:withdraw(playeridparams[])
{
    if(
IsPlayerInRangeOfPoint(playerid2, -2455.4519503.933630.0781))
    {
         new 
amount;
        if(
sscanf(params"d"amount)) return SendClientMessage(playerid, -1"USAGE: /withdraw [amount]");
        if(
pInfo[playerid][Bank] < amount || amount 1) return SendClientMessage(playerid, -1"Error: You haven't that much money or invalid amount.");
        
GivePlayerMoney(playeridamount);
        
pInfo[playerid][Bank] -= amount;
    }
    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: 2 Guest(s)