Its not depositting money
#1

Hey, when I /deposit it takes the money from me, but it doesn't add it to the file

pawn Код:
CMD:deposit(playerid, params[])
{
    new number, ammount;
    if(!sscanf(params, "ii", number, ammount))
    {
        format(file, sizeof(file), "realityrp/bank/%d.ini", number);
        if(fexist(file))
        {
            if(ammount <= GetPlayerMoney(playerid))
            {
                if(IsPlayerInRangeOfPoint(playerid, 10.0, 2316.429443, -6.910340, 26.742187) || IsPlayerInRangeOfPoint(playerid, 10.0, 326.8708,131.4956,1007.9657))
                {
                    new string[64];
                    format(string, sizeof(string), "You deposited %d dollar in this bank account.", ammount);
                    SendClientMessage(playerid, 0xFFFFFFFF, string);
                    new mon = dini_Int(file, "Money") + ammount;
                    dini_IntSet(file, "Money", mon);
                    GivePlayerMinusCash(playerid, ammount);
                    return 1;
                }
                else return SendClientMessage(playerid, COLOR_GREY, "You are not at the bank!");
            }
            else return SendClientMessage(playerid, COLOR_GREY, "You don't have that much money!");
        }
        else return SendClientMessage(playerid, 0xFFFFFFFF, "The account you are trying to deposit money at, doesn't exist in our DataBase.");
    }
    else return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /deposit [Account Number] [Ammount]");
}
Reply


Messages In This Thread
Its not depositting money - by milanosie - 11.02.2012, 10:27
Re : Its not depositting money - by ricardo178 - 11.02.2012, 14:00
Re : Its not depositting money - by ricardo178 - 11.02.2012, 17:38

Forum Jump:


Users browsing this thread: 1 Guest(s)