Public Payday
#2

try this,
Код:
public PayDay()
{
    new string[128];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && !IsPlayerNPC(i))
        {
            if(PlayerInfo[i][pLevel] > 0)
            {
                new tax = (Tax / 2)*(PlayerInfo[i][pLevel]);
                if(PlayerInfo[i][pAccount] > PlayerInfo[i][pCash])
                {
                    PlayerInfo[i][pAccount] = PlayerInfo[i][pAccount]-tax;
                    banksys[dCash] = banksys[dCash]+tax;
                    SaveCityhallSystem()
                    format(string, sizeof(string), "  Government Tax: -$%d", tax);
                    SendClientMessage(i, COLOR_GREEN, string);
                }
                else
                {
                    PlayerInfo[i][pCash] = PlayerInfo[i][pCash]-tax;
                    banksys[dCash] = banksys[dCash]+tax;
                    SaveCityhallSystem()
                    format(string, sizeof(string), "  Government Tax: -$%d", tax);
                    SendClientMessage(i, COLOR_GREEN, string);
                }
                if(PlayerInfo[i][pAddict] == 1)
                {
                    PlayerInfo[i][pExp]+= 4;
                }
                PlayerInfo[i][pExp]+= 2;
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Public Payday - by ***Niko*** - 24.11.2013, 01:00
Re: Public Payday - by AiRaLoKa - 24.11.2013, 02:33

Forum Jump:


Users browsing this thread: 1 Guest(s)