02.08.2013, 10:09
When players do /signcheck they get a huge tax interest or something of like -$17343424442 wich makes you poor right away. This happens at every /signcheck
Код:
SendPayCheck(i)
{
new account,cash,interest;
new tmpintrate = 1; //interest rate
account = PlayerInfo[i][pAccount]; //bank account amount
cash = PlayerInfo[i][pCash];
if(PlayerInfo[i][pPayDay] >= 5)
{
new checks = PlayerInfo[i][pPayCheck]; //paycheck amount
new incometax = PlayerInfo[i][pPayCheck] / 100 * Tax; //income tax amount
GiveMoney(i,); //give money
//TAX MONEY
TaxValue = TaxValue+incometax;
//ELECTRICITY
new ebill = 0;
if(PlayerInfo[i][pHouseID] != 0)
{ //owns house
new randomv = random(1000);
ebill += (randomv*HouseInfo[PlayerInfo[i][pHouseID]][hLevel])/2;
}
if(PlayerInfo[i][pBizKey] != -1)
{ //owns business
new bizkey = PlayerInfo[i][pBizKey];
ebill += (BizInfo[bizkey][bTill])/4;
}
interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate); //interest
PlayerInfo[i][pAccount] = account+interest; //add interest money to bank
PlayerInfo[i][pExp]++;
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][pBizKey] != -1 || PlayerInfo[i][pHouseID] != 0)
{ //owns house or business
GiveMoney(i,-ebill);
format(string, sizeof(string), " Electricity Bill: -$%d", ebill);
SendClientMessage(i, COLOR_GRAD1, string);
}
format(string, sizeof(string), " Interest Rate: 0.%d percent",tmpintrate);
SendClientMessage(i, COLOR_GRAD2, string);
format(string, sizeof(string), " Interest Gained $%d", interest);
SendClientMessage(i, COLOR_GRAD2, string);
SendClientMessage(i, COLOR_GRAD4, "|------------------------------------------|");
format(string, sizeof(string), " Old Balance: $%d", account);
SendClientMessage(i, COLOR_GRAD5, string);
format(string, sizeof(string), " Old Cash: $%d", cash);
SendClientMessage(i, COLOR_GRAD5, string);
format(string, sizeof(string), " New Balance: $%d", PlayerInfo[i][pAccount]);
SendClientMessage(i, COLOR_GRAD5, string);
PlayerInfo[i][pCheck] = 0;
PlayerInfo[i][pPayDay] = 0;
PlayerInfo[i][pPayCheck] = 0;
}
else
{
PlayerInfo[i][pCheck] = 0;
PlayerInfo[i][pPayDay] = 0;
PlayerInfo[i][pPayCheck] = 0;
SendClientMessage(i, COLOR_LIGHTRED, "* You haven't played long enough to obtain a Paycheck.");
}
return 1;
}

