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
#2

Bump

Please help me
Reply
#3

are you sure it goes into the file ?
Reply
#4

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*
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)