Round all payday values
This commit is contained in:
@@ -31,19 +31,19 @@ function playerPayDay(client) {
|
||||
let grossIncome = getPlayerData(client).payDayAmount;
|
||||
|
||||
// Passive income
|
||||
grossIncome = grossIncome + getGlobalConfig().economy.passiveIncomePerPayDay;
|
||||
grossIncome = Math.round(grossIncome + getGlobalConfig().economy.passiveIncomePerPayDay);
|
||||
|
||||
// Payday bonus
|
||||
grossIncome = grossIncome*getGlobalConfig().economy.grossIncomeMultiplier;
|
||||
grossIncome = Math.round(grossIncome * getGlobalConfig().economy.grossIncomeMultiplier);
|
||||
|
||||
// Double bonus
|
||||
if (isDoubleBonusActive()) {
|
||||
grossIncome = grossIncome*2;
|
||||
grossIncome = Math.round(grossIncome * 2);
|
||||
}
|
||||
|
||||
let incomeTaxAmount = Math.round(calculateIncomeTax(wealth));
|
||||
|
||||
let netIncome = grossIncome-incomeTaxAmount;
|
||||
let netIncome = Math.round(grossIncome - incomeTaxAmount);
|
||||
|
||||
messagePlayerAlert(client, "== Payday! =============================");
|
||||
messagePlayerInfo(client, `Paycheck: {ALTCOLOUR}$${grossIncome}`);
|
||||
@@ -167,7 +167,7 @@ function attemptRepossession(client, totalToPay) {
|
||||
function repossessFirstAsset(client) {
|
||||
let vehicles = getAllVehiclesOwnedByPlayer(client);
|
||||
if (vehicles.length > 0) {
|
||||
deleteVehicle(vehicles[0])
|
||||
deleteVehicle(vehicles[0]);
|
||||
return getGlobalConfig().economy.upKeepCosts.upKeepPerVehicle;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user