29.03.2012, 09:24
I have problem the paycheck system always show me this''You haven't played long enough to obtain a paycheck''
Код:
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); if(PlayerInfo[i][pDonateRank] == 0) { format(string, sizeof(string), " Balance: $%d | Interest rate: 0.%d percent (50k max)", account, tmpintrate); SendClientMessageEx(i, COLOR_GRAD1, string); } if(PlayerInfo[i][pTaxiLicense] == 1) { format(string, sizeof(string), " Taxi licensing fee (5 percent): -$%d",faretax); SendClientMessageEx(i, COLOR_GRAD2, string); } if(PlayerInfo[i][pMember] != 0 && PlayerInfo[i][pMember] != 8 && PlayerInfo[i][pMember] != 13) { if(Tax <= 0) { SendClientMessageEx(i,COLOR_RED,"The government is in debt; no money is available for pay."); } else { Tax -= FactionPay[PlayerInfo[i][pMember]-1][PlayerInfo[i][pRank]]; format(string,sizeof(string)," Government pay: $%d", FactionPay[PlayerInfo[i][pMember]-1][PlayerInfo[i][pRank]]); SendClientMessageEx(i, COLOR_GRAD2, string); } } format(string, sizeof(string), " Interest gained: $%d", interest); SendClientMessageEx(i, COLOR_GRAD3, string); SendClientMessageEx(i, COLOR_GRAD4, "______________________________________"); format(string, sizeof(string), " New balance: $%d | Rent paid: -$%d", PlayerInfo[i][pAccount],rent); SendClientMessageEx(i, COLOR_GRAD5, string); new paycheck = checks - Taxable - faretax; if(PlayerInfo[i][pMember] != 0 && PlayerInfo[i][pMember] != 8 && PlayerInfo[i][pMember] != 13 && Tax >= 0) { new facmemberpay = FactionPay[PlayerInfo[i][pMember]-1][PlayerInfo[i][pRank]]; GivePlayerCash(i, facmemberpay); } GivePlayerCash(i, paycheck); GameTextForPlayer(i, "~y~PayDay~n~~w~Paycheck", 5000, 1); SendAudioToPlayer(i, 1184, 100, 0); PlayerInfo[i][pPayDay] = 0; PlayerInfo[i][pPayCheck] = 0; PlayerInfo[i][pConnectTime] += 1; if(PlayerInfo[i][pConnectTime] == 2) SendClientMessageEx(i, COLOR_LIGHTRED, "You're now allowed to use firearms!"); if(PlayerInfo[i][pDonateRank] > 0) { PlayerInfo[i][pPayDayHad] += 1; if(PlayerInfo[i][pPayDayHad] >= 5) { PlayerInfo[i][pExp]++; PlayerInfo[i][pPayDayHad] = 0; } } if(PlayerInfo[i][pWRestricted] > 0) { PlayerInfo[i][pWRestricted]--; if(PlayerInfo[i][pWRestricted] == 0) SendClientMessageEx(i, COLOR_LIGHTRED, "Your weapons are no longer restricted!"); } } else { SendClientMessageEx(i, COLOR_LIGHTRED, "* You haven't played long enough to obtain a paycheck."); } }