From 6b3651f6609d25a7dc661aee125d5f869570cabd Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sat, 4 Mar 2023 08:34:57 -0600 Subject: [PATCH] Check for job and rank on payday --- scripts/server/economy.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/server/economy.js b/scripts/server/economy.js index ce042c12..cadd11d0 100644 --- a/scripts/server/economy.js +++ b/scripts/server/economy.js @@ -35,7 +35,11 @@ function playerPayDay(client) { // Job Pay if (getPlayerJob(client) != -1) { - grossIncome = Math.round(grossIncome + getJobRankData(getPlayerJob(client), getPlayerJobRank(client)).pay); + if (!getJobRankData(getPlayerJob(client), getPlayerJobRank(client))) { + grossIncome = grossIncome + 0; + } else { + grossIncome = Math.round(grossIncome + getJobRankData(getPlayerJob(client), getPlayerJobRank(client)).pay); + } } // Payday bonus