From 5b08bc9141ba495b272cbd5b1f8b7675f979c2f9 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Mon, 21 Dec 2020 22:51:39 -0600 Subject: [PATCH] Add a few more colours --- scripts/server/colour.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/scripts/server/colour.js b/scripts/server/colour.js index 11a4cb2a..66e593c5 100644 --- a/scripts/server/colour.js +++ b/scripts/server/colour.js @@ -30,6 +30,8 @@ let serverColours = { royalBlue: toColour(0, 0, 255, 255), teal: toColour(0, 255, 255, 255), orange: toColour(255, 128, 0, 255), + softRed: toColour(205, 92, 92, 255), + softGreen: toColour(50, 205, 50, 255), lightPurple: toColour(150, 0, 150, 255), lightGrey: toColour(200, 200, 200, 255), mediumGrey: toColour(150, 150, 150, 255), @@ -39,6 +41,7 @@ let serverColours = { firefighterRed: toColour(205, 92, 92, 255), busDriverGreen: toColour(50, 205, 50, 255), taxiDriverYellow: toColour(240, 230, 140, 255), + civilianWhite: toColour(255, 255, 255, 255), burntYellow: toColour(210, 210, 0, 255), burntOrange: toColour(210, 120, 0, 255), bankGreen: toColour(0, 150, 0, 255), @@ -64,4 +67,20 @@ function getColourByName(colourName) { return getServerColours().byName[colourName]; } +// --------------------------------------------------------------------------- + +function getPlayerColour(client) { + if(getClientData(client) != false) { + if(!isClientLoggedIn(client)) { + return getColourByName("darkGrey"); + } else { + if(isPlayerWorking(client)) { + return getJobData(getClientCurrentSubAccount(client).job).colour; + } + } + } + + return getColourByName("civilianWhite"); +} + // --------------------------------------------------------------------------- \ No newline at end of file