Help With Bank
#1

Im making a bank, but deposit command is bugged, it just takes my money, it doesnt insert to the savefile or bank. Balance is still 0 after i deposited.

pawn Код:
dcmd_deposit(playerid, params[])
{
    if(!IsPlayerInRangeOfPoint(playerid, 5, 2316.6206, -7.2522, 26.7422)) return SendClientMessage(playerid, red, "Error: You must be in the bank checkpoint to use this command");
    new amount, deposit, money = GetPlayerMoney(playerid);
    amount = strval(params);
    if(amount == 0 || amount < 0) return SendClientMessage(playerid, red, "Error: Invalid amount");
    if(amount > money || amount == money) return SendClientMessage(playerid, red, "Error: Invalid amount");
    GivePlayerMoney(playerid, -amount);
    deposit = udb_UserInt(Name(playerid)).("Deposited");
    udb_UserSetInt(Name(playerid)).("Deposited", deposit+amount);
    return 1;
}
Reply


Messages In This Thread
Help With Bank - by [NWA]Hannes - 27.07.2010, 21:44
Re: Help With Bank - by [NWA]Hannes - 29.07.2010, 09:16
Re: Help With Bank - by willsuckformoney - 29.07.2010, 09:40
Re: Help With Bank - by [NWA]Hannes - 29.07.2010, 21:30

Forum Jump:


Users browsing this thread: 2 Guest(s)