pawn Код:
public PayDay()
{
new string[128];
new sendername[MAX_PLAYER_NAME];
new account;
new interest;
new rent = 0;
new playername2[MAX_PLAYER_NAME];
if(RobStatus[BankReload] == 1)
{
RobStatus[BankReload] = 0;
}
if(RobStatus[BankReload] == 2)
{
RobStatus[BankReload] = 1;
}
for(new i = 0; i<MAX_PLAYERS; i++)
{
new bizkey = PlayerInfo[i][pPbiskey];
if(IsPlayerConnected(i))
{
if(UsingWeed[i] == 1)
{
SetPlayerWeather(i, -66);
SetPlayerTime(i, 12, 0);
}
if(UsingEcstasy[i] == 1)
{
SetPlayerWeather(i, -66);
SetPlayerTime(i, 23, 0);
}
if(UsingCrack[i] == 1)
{
SetPlayerWeather(i, 45);
SetPlayerTime(i, 12, 0);
}
if(MoneyMessage[i] == 1 && PlayerInfo[i][pJailed] == 0)
{
SendClientMessage(i, COLOR_LIGHTRED, "You failed to pay your debt, Jail time.");
SetPlayerInterior(i, 0);
SetPlayerPos(i, 264.6288, 77.5742, 1001.0391);
ResetPlayerWeapons(i);
ClearGuns(i);
TogglePlayerControllable(i, 1);
PlayerInfo[i][pWantedLevel] = 0;
PlayerInfo[i][pJailed] = 1;
PlayerInfo[i][pJailTime] = 240;
format(string, sizeof(string), "* You are jailed for %d seconds, Bail: Unavailable.", PlayerInfo[i][pJailTime]);
SendClientMessage(i, COLOR_LIGHTBLUE, string);
}
if(PlayerInfo[i][pLevel] > 0)
{
GetPlayerName(i, sendername, sizeof(sendername));
account = PlayerInfo[i][pAccount];
if(PlayerInfo[i][pPayDay] >= 5)
{
GetPlayerName(i, playername2, sizeof(playername2));
new checks = PlayerInfo[i][pPayCheck]; //paycheck amount
new incometax = PlayerInfo[i][pPayCheck] / 100 * Tax; //income tax amount
// Business Electricity Bills
new randomv2 = random(100);
new ebill2 = (randomv2*BizzInfo[bizkey][bLevelNeeded])/10;
if(PlayerInfo[i][pPbiskey] >= 1)
{
PlayerInfo[i][pCash] = PlayerInfo[i][pCash]-ebill2;
GivePlayerMoney(i, -ebill2);
}
PlayerInfo[i][pCash] = PlayerInfo[i][pCash]+checks-incometax;
GivePlayerMoney(i, checks-incometax);
//TAX MONEY
TaxValue = TaxValue+incometax;
//INTEREST
interest = (PlayerInfo[i][pAccount]/1000)*(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][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: 0.%d percent",tmpintrate);
SendClientMessage(i, COLOR_GRAD2, string);
}
else if(PlayerInfo[i][pDonateRank] == 1)
{
tmpintrate = tmpintrate/5;
format(string, sizeof(string), " Interest rate: 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: 0.%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: %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: %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: %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)
{
PlayerInfo[i][pExp] = PlayerInfo[i][pExp] +5;
PlayerInfo[i][pPayDay] = 0;
PlayerInfo[i][pPayCheck] = 0;
PlayerInfo[i][pConnectTime] += 5;
PlayerInfo[i][pRPBoost] = 0;
}
else
{
PlayerInfo[i][pExp] ++;
PlayerInfo[i][pPayDay] = 0;
PlayerInfo[i][pPayCheck] = 0;
PlayerInfo[i][pConnectTime] += 1;
}
}
else
{
SendClientMessage(i, COLOR_WHITE, "{800040}Error :- {FFFFFF}You didn't contact the bank in time to recieve your paycheck [{800040}OOC{FFFFFF} : Not online for enough time]");
}
}
}
}
return 1;
}
there is line there? the player does get money but its to much how to lower the payout