From 3b5b66db5351ef58af96847635f8d3e3f79709d3 Mon Sep 17 00:00:00 2001 From: VortrexFTW Date: Wed, 9 Sep 2020 03:55:15 -0500 Subject: [PATCH] Use backtick for get sacct name string --- scripts/server/utilities.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/scripts/server/utilities.js b/scripts/server/utilities.js index e28c4a75..3c8f12b3 100644 --- a/scripts/server/utilities.js +++ b/scripts/server/utilities.js @@ -3106,7 +3106,8 @@ function getClientCurrentSubAccount(client) { // --------------------------------------------------------------------------- function getClientSubAccountName(client) { - return getClientCurrentSubAccount(client).firstName + " " + getClientCurrentSubAccount(client).lastName; + let subAccountData = getClientCurrentSubAccount(client); + return `${subAccountData.firstName} ${subAccountData.lastName}`; } // --------------------------------------------------------------------------- @@ -3359,11 +3360,13 @@ function canClientUseGuns(client) { // --------------------------------------------------------------------------- function saveAllServerDataToDatabase() { + console.log("[Asshat.Utilities]: Saving all server data to database ..."); saveAllClientsToDatabase(); saveAllVehiclesToDatabase();; saveAllHousesToDatabase(); saveAllBusinessesToDatabase(); saveAllClansToDatabase(); + console.log("[Asshat.Utilities]: Saved all server data to database!"); } // --------------------------------------------------------------------------- @@ -3451,4 +3454,16 @@ function processHoldVehicleEngineKey(client) { } +// --------------------------------------------------------------------------- + +function getClientChatColour(client) { + let tempJob = getClientCurrentSubAccount(client).job; + if(job != -1) { + if(getClientData(client).isWorking) { + return getJobData(tempJob).jobColour; + } + } + return getColourByName("white"); +} + // --------------------------------------------------------------------------- \ No newline at end of file