From d33356b4c2b587ad23eae48f7d1642b97997a20b Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Wed, 9 Mar 2022 05:17:02 -0600 Subject: [PATCH] Add business arrow markers --- scripts/client/label.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/client/label.js b/scripts/client/label.js index d794b549..4f20d67a 100644 --- a/scripts/client/label.js +++ b/scripts/client/label.js @@ -247,19 +247,19 @@ function renderJobLabel(name, position, jobType) { // ------------------------------------------------------------------------- function processLabelRendering() { - if(renderLabels && areWorldLabelsSupported()) { - if(localPlayer != null) { - if(!areServerElementsSupported()) { - //for(let i in businesses) { - // if(getDistance(localPlayer.position, businesses[i].entrancePosition) <= 75.0) { - // natives.drawColouredCylinder(businesses[i].entrancePosition, 0.0, 0.0, 0, 153, 255); - // } - //} - - // natives.getScreenViewportId - // natives.getGameViewportId - // natives.getViewportPositionOfCoord - } else { + if(renderLabels) { + if(!areServerElementsSupported()) { + if(localPlayer != null) { + for(let i in businesses) { + if(getDistance(localPlayer.position, businesses[i].entrancePosition) <= 75.0) { + natives.drawColouredCylinder(getPosBelowPos(businesses[i].entrancePosition, 1.0), 0.0, 0.0, 0, 153, 255, 255); + } + } + } + } + + if(areWorldLabelsSupported()) { + if(localPlayer != null) { let pickups = getElementsByType(ELEMENT_PICKUP); for(let i in pickups) { if(pickups[i].getData("vrr.label.type") != null) {