I don't have payday
#3

pawn Код:
public PayDay()
{
    new string[128];
    new account,interest;
    new rent = 0;
    GiftAllowed = 1;
    foreach(Player, i)
    {
            if(PlayerInfo[i][pLevel] > 0)
            {
                if(MoneyMessage[i]==1)
                {
                    if( PlayerInfo[i][pJailed] < 1 && !IsACop(i))
                    {
                        format(string,sizeof(string),"You're failing to pay your debt of $%d - now the police are on the look out for you.",GetPlayerCash(i));
                        SendClientMessageEx(i, COLOR_LIGHTRED, string);
                        if(PlayerInfo[i][pWantedLevel] < 6) PlayerInfo[i][pWantedLevel] += 1;
                        PlayerInfo[i][pCrimes] += 1;
                        SetPlayerWantedLevel(i, PlayerInfo[i][pWantedLevel]);
                    }
                }
                account = PlayerInfo[i][pAccount];
                if(PlayerInfo[i][pRenting] != INVALID_HOUSE_ID)
                {
                    if(HouseInfo[PlayerInfo[i][pRenting]][hRentFee] > PlayerInfo[i][pAccount])
                    {
                        PlayerInfo[i][pRenting] = INVALID_HOUSE_ID;
                        SendClientMessageEx(i, COLOR_WHITE, "You have been evicted.");
                    }
                    else {
                        HouseInfo[PlayerInfo[i][pRenting]][hSafeMoney] += HouseInfo[PlayerInfo[i][pRenting]][hRentFee];
                        PlayerInfo[i][pAccount] -= HouseInfo[PlayerInfo[i][pRenting]][hRentFee];
                    }
                }
                new tmpintrate, faretax;
                tmpintrate = 1;

               
                if(PlayerInfo[i][pLevel] <= 5) SendClientMessageEx(i,COLOR_LIGHTBLUE,"Need to travel somewhere and don't have wheels? Use '/service taxi' to call a cab!");
                if(PlayerInfo[i][pPayDay] >= 5)
                {
                    if(GetPVarInt(i, "AdvisorDuty") == 1)
                    {
                        PlayerInfo[i][pDutyHours]++;
                    }
                    if(PlayerInfo[i][pDonateRank] > 0)
                    {
                        new bonus = PlayerInfo[i][pPayCheck] / 2;
                        PlayerInfo[i][pPayCheck] += bonus;
                    }
                    if(SpecTimer == 1)
                    {
                        AddSpecialToken(i);
                    }
                    rent = 0;
                    faretax = 0;
                    new checks = PlayerInfo[i][pPayCheck];
                    if(PlayerInfo[i][pTaxiLicense] == 1) faretax = (checks/100)*5;
                    new Taxable = (( checks / 100 ) * TaxValue);
                    PlayerInfo[i][pAccount] -= Taxable + faretax;
                    Tax += Taxable + faretax;


                    PlayerInfo[i][pExp]++;
                    PlayerInfo[i][pAccount] = account+interest;
                    SendClientMessageEx(i, COLOR_WHITE, "________ BANK STATEMENT ________");
                    format(string, sizeof(string), "  Paycheck: $%d  |  Tax Money: -$%d (%d percent)", checks, Taxable, TaxValue);
                    SendClientMessageEx(i, COLOR_GRAD1, string);
Not sure, But try it
Reply


Messages In This Thread
I don't have payday - by dat_nguyen - 18.08.2011, 12:39
Re: I don't have payday - by dat_nguyen - 18.08.2011, 14:56
Re: I don't have payday - by ElieJabbour - 18.08.2011, 15:12
Re: I don't have payday - by dat_nguyen - 18.08.2011, 15:26
Re: I don't have payday - by ElieJabbour - 18.08.2011, 15:30
Re: I don't have payday - by dat_nguyen - 18.08.2011, 15:35
Re: I don't have payday - by Twizted - 18.08.2011, 17:12
Re: I don't have payday - by gamer931215 - 18.08.2011, 17:16
Re: I don't have payday - by ElieJabbour - 18.08.2011, 17:24
Re: I don't have payday - by dat_nguyen - 25.08.2011, 11:29

Forum Jump:


Users browsing this thread: 1 Guest(s)