Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PayDay(i) {
- new
- string[128],
- interest,
- year,
- month,
- day;
- getdate(year, month, day);
- if(PlayerInfo[i][pLevel] > 0) {
- if(GetPVarType(i, "debtMsg")) {
- if(GetPlayerCash(i) < 0 && PlayerInfo[i][pJailTime] < 1 && !IsACop(i) && PlayerInfo[i][pWantedLevel] < 6) {
- format(string,sizeof(string),"You're in debt $%s - find a way to pay back the money or you might get in trouble!", number_format(GetPlayerCash(i)));
- SendClientMessageEx(i, COLOR_LIGHTRED, string);
- }
- else DeletePVar(i, "debtMsg");
- }
- if(0 <= PlayerInfo[i][pRenting] < sizeof HouseInfo) {
- if(HouseInfo[PlayerInfo[i][pRenting]][hRentFee] > PlayerInfo[i][pAccount]) {
- PlayerInfo[i][pRenting] = INVALID_HOUSE_ID;
- SendClientMessageEx(i, COLOR_WHITE, "You have been evicted from your residence for failing to pay rent fees.");
- }
- else {
- HouseInfo[PlayerInfo[i][pRenting]][hSafeMoney] += HouseInfo[PlayerInfo[i][pRenting]][hRentFee];
- PlayerInfo[i][pAccount] -= HouseInfo[PlayerInfo[i][pRenting]][hRentFee];
- }
- }
- if(PlayerInfo[i][pConnectSeconds] >= 3600) {
- if(GetPVarType(i, "AdvisorDuty")) {
- PlayerInfo[i][pDutyHours]++;
- }
- if(SpecTimer) AddSpecialToken(i);
- SendClientMessageEx(i, COLOR_WHITE, "________ BANK STATEMENT ________");
- if(PlayerInfo[i][pNation] == 0)
- {
- format(string, sizeof(string), " Paycheck: $%s | SA Gov Tax: $%s (%d percent)", number_format(PlayerInfo[i][pPayCheck]), number_format((PlayerInfo[i][pPayCheck] / 100) * TaxValue), TaxValue);
- PlayerInfo[i][pAccount] -= (PlayerInfo[i][pPayCheck] / 100) * TaxValue;
- Tax += (PlayerInfo[i][pPayCheck] / 100) * TaxValue;
- }
- else if(PlayerInfo[i][pNation] == 1)
- {
- format(string, sizeof(string), " Paycheck: $%s | TR Gov Tax: $%s (%d percent)", number_format(PlayerInfo[i][pPayCheck]), number_format((PlayerInfo[i][pPayCheck] / 100) * TRTaxValue), TRTaxValue);
- PlayerInfo[i][pAccount] -= (PlayerInfo[i][pPayCheck] / 100) * TRTaxValue;
- TRTax += (PlayerInfo[i][pPayCheck] / 100) * TRTaxValue;
- }
- SendClientMessageEx(i, COLOR_GRAD1, string);
- interest = (PlayerInfo[i][pAccount] + 1) / 1000;
- switch(PlayerInfo[i][pDonateRank]) {
- case 0: {
- if(interest > 50000) interest = 50000;
- format(string, sizeof(string), " Balance: $%s | Interest rate: 0.1 percent (50k max)", number_format(PlayerInfo[i][pAccount]));
- SendClientMessageEx(i, COLOR_GRAD1, string);
- }
- case 1: {
- if(interest > 100000) interest = 100000;
- format(string, sizeof(string), " Balance: $%s | Interest rate: 0.1 percent {FFFF00}(Bronze VIP: 100k max)", number_format(PlayerInfo[i][pAccount]));
- SendClientMessageEx(i, COLOR_GRAD1, string);
- }
- case 2: {
- if(interest > 150000) interest = 150000;
- format(string, sizeof(string), " Balance: $%s | Interest rate: 0.1 percent {FFFF00}(Silver VIP: 150k max)", number_format(PlayerInfo[i][pAccount]));
- SendClientMessageEx(i, COLOR_GRAD1, string);
- }
- case 3: {
- if(interest > 200000) interest = 200000;
- format(string, sizeof(string), " Balance: $%s | Interest rate: 0.1 percent {FFFF00}(Gold VIP: 200k max)", number_format(PlayerInfo[i][pAccount]));
- SendClientMessageEx(i, COLOR_GRAD1, string);
- }
- case 4, 5: {
- if(interest > 250000) interest = 250000;
- format(string, sizeof(string), " Balance: $%s | Interest rate: 0.1 percent {FFFF00}(Platinum VIP: 250k max)", number_format(PlayerInfo[i][pAccount]));
- SendClientMessageEx(i, COLOR_GRAD1, string);
- }
- }
- if(PlayerInfo[i][pTaxiLicense] == 1) {
- PlayerInfo[i][pAccount] -= (PlayerInfo[i][pPayCheck] / 100) * 5;
- Tax += (PlayerInfo[i][pPayCheck] / 100) * 5;
- format(string, sizeof(string), " Taxi licensing fee (5 percent): $%s", number_format((PlayerInfo[i][pPayCheck] / 100) * 5));
- SendClientMessageEx(i, COLOR_GRAD2, string);
- }
- for(new iGroupID; iGroupID < MAX_GROUPS; iGroupID++)
- {
- if(PlayerInfo[i][pNation] == 0)
- {
- if(arrGroupData[iGroupID][g_iAllegiance] == 1)
- {
- if(arrGroupData[iGroupID][g_iGroupType] == 5)
- {
- new str[128], file[32];
- format(str, sizeof(str), "%s has paid $%s in tax.", GetPlayerNameEx(i), number_format((PlayerInfo[i][pPayCheck] / 100) * TaxValue));
- format(file, sizeof(file), "grouppay/%d/%d-%d-%d.log", iGroupID, month, day, year);
- Log(file, str);
- }
- }
- }
- else if (PlayerInfo[i][pNation] == 1)
- {
- if(arrGroupData[iGroupID][g_iAllegiance] == 2)
- {
- if(arrGroupData[iGroupID][g_iGroupType] == 5)
- {
- new str[128], file[32];
- format(str, sizeof(str), "%s has paid $%s in tax.", GetPlayerNameEx(i), number_format((PlayerInfo[i][pPayCheck] / 100) * TaxValue));
- format(file, sizeof(file), "grouppay/%d/%d-%d-%d.log", iGroupID, month, day, year);
- Log(file, str);
- }
- }
- }
- }
- PlayerInfo[i][pAccount] += interest;
- format(string, sizeof(string), " Interest gained: $%s", number_format(interest));
- SendClientMessageEx(i, COLOR_GRAD3, string);
- SendClientMessageEx(i, COLOR_GRAD4, "______________________________________");
- format(string, sizeof(string), " New balance: $%s | Rent paid: $%s", number_format(PlayerInfo[i][pAccount]), number_format((0 <= PlayerInfo[i][pRenting] < sizeof HouseInfo) ? (HouseInfo[PlayerInfo[i][pRenting]][hRentFee]) : (0)));
- SendClientMessageEx(i, COLOR_GRAD5, string);
- GivePlayerCash(i, PlayerInfo[i][pPayCheck]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement