18.05.2015, 21:21
Код:
This is what I have if(DepositAmmount>CurrentAmmount) return SendClientMessage(playerid,COLOR_RED,"Nemate toliko novca za poloziti!");//if he has 20,and tries to deposit 21,he won't be able else { new INI:bFile=INI_Open(BankDB(playerid));//else we open his DataBase INI_SetTag(bFile,"BankData");//we set the tag BankInfo[playerid][DepositedMoney]=BankInfo[playerid][DepositedMoney]+DepositAmmount;//we modify the deposit variable by adding to it the number inserted through the dialog INI_WriteInt(bFile,"DepositedMoney",BankInfo[playerid][DepositedMoney]);//and of course we store it INI_Close(bFile);//then we close the file GivePlayerMoney(playerid,-DepositAmmount);//BUT the player looses the deposited ammount(he had 40$,deposited 20$,now he has 20$) SendClientMessage(playerid,COLOR_YELLOW,"Uspjesno ste polozili novac,za informacije pisi /racuninfo!"); }