Need help with bank interest.
#1

The bank interest in my script is not working correctly for regular users and VIP users as well. If someone could please take a look at it and get back to me that would be great.

pawn Код:
//INTEREST
                    interest = (PlayerInfo[i][pAccount]/500)*(tmpintrate); //bank interest
                    PlayerInfo[i][pAccount] = account+interest; //add interest money to bank
                    //EXP
                    SendClientMessage(i, COLOR_WHITE, "|___ BANK STATEMENT ___|");
                    format(string, sizeof(string), "  Paycheck: $%d", checks);
                    SendClientMessage(i, COLOR_GRAD1, string);
                    format(string, sizeof(string), "  Income Tax: -$%d", incometax);
                    SendClientMessage(i, COLOR_GRAD1, string);
                    if(PlayerInfo[i][pPhousekey] >= 1)
                    {
                        format(string, sizeof(string), "  House Electricity Bill: -$%d", ebill1);
                        SendClientMessage(i, COLOR_GRAD1, string);
                    }
                    if(PlayerInfo[i][pPbiskey] >= 1)
                    {
                        format(string, sizeof(string), "  Business Electricity Bill: -$%d", ebill2);
                        SendClientMessage(i, COLOR_GRAD1, string);
                    }
                    format(string, sizeof(string), "  Rent: -$%d", rent);
                    SendClientMessage(i, COLOR_GRAD1, string);
                    format(string, sizeof(string), "  Balance: $%d", account);
                    SendClientMessage(i, COLOR_GRAD1, string);
                    if(PlayerInfo[i][pDonateRank] == 0)
                    {
                        tmpintrate = tmpintrate/5;
                        format(string, sizeof(string), "  Interest rate: 2.5%d percent",tmpintrate);
                        SendClientMessage(i, COLOR_GRAD2, string);
                    }
                    else if(PlayerInfo[i][pDonateRank] == 1)
                    {
                        tmpintrate = tmpintrate/5;
                        format(string, sizeof(string), "  Interest rate: 3.0%d percent [Bronze VIP]",tmpintrate);
                        SendClientMessage(i, COLOR_GRAD2, string);
                    }
                    else if(PlayerInfo[i][pDonateRank] == 2)
                    {
                        tmpintrate = tmpintrate/5;
                        format(string, sizeof(string), "  Interest rate: 3.4%d percent [Silver VIP]",tmpintrate);
                        SendClientMessage(i, COLOR_GRAD2, string);
                    }
                    else if(PlayerInfo[i][pDonateRank] == 3)
                    {
                        tmpintrate = tmpintrate/10;
                        format(string, sizeof(string), "  Interest rate: 3.8%d percent [Gold VIP]",tmpintrate);
                        SendClientMessage(i, COLOR_GRAD2, string);
                    }
                    else if(PlayerInfo[i][pDonateRank] == 4)
                    {
                        tmpintrate = tmpintrate/10;
                        format(string, sizeof(string), "  Interest rate: 4.0%d percent [Platinium VIP]",tmpintrate);
                        SendClientMessage(i, COLOR_GRAD2, string);
                    }

                    else if(PlayerInfo[i][pDonateRank] == 5)
                    {
                        tmpintrate = tmpintrate/10;
                        format(string, sizeof(string), "  Interest rate: 4.2%d percent [VIP Moderator]",tmpintrate);
                        SendClientMessage(i, COLOR_GRAD2, string);
                    }
                    format(string, sizeof(string), "  Interest gained $%d", interest);
                    SendClientMessage(i, COLOR_GRAD3, string);
                    SendClientMessage(i, COLOR_GRAD4, "|------------------------------------------|");
                    format(string, sizeof(string), "  New Balance: $%d", PlayerInfo[i][pAccount]);
                    SendClientMessage(i, COLOR_GRAD5, string);
                    format(string, sizeof(string), "~y~PayDay~n~~w~Paycheck");
                    GameTextForPlayer(i, string, 5000, 1);
                    if(PlayerInfo[i][pRPBoost] == 1)
Reply
#2

Can you put pawn tags around it? It's a bit easier to read then.

pawn Код:
text
[pawnn][/pawnn] remove one of the n's.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)