SA-MP Forums Archive
Help With Bank - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help With Bank (/showthread.php?tid=163531)



Help With Bank - [NWA]Hannes - 27.07.2010

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;
}



Re: Help With Bank - [NWA]Hannes - 29.07.2010

Bump

Please help me


Re: Help With Bank - willsuckformoney - 29.07.2010

are you sure it goes into the file ?


Re: Help With Bank - [NWA]Hannes - 29.07.2010

Quote:
Originally Posted by willsuckformoney
Посмотреть сообщение
are you sure it goes into the file ?
Evrything is right scripted but it just dont save into file

EDIT: and bank*