From 200c340e8e798865c8324c870f031148a035f8d8 Mon Sep 17 00:00:00 2001 From: "michael.reiswich" Date: Fri, 26 Mar 2021 19:11:17 +0100 Subject: [PATCH] next --- ReallifeGamemode.Client/Gui/blips.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ReallifeGamemode.Client/Gui/blips.ts b/ReallifeGamemode.Client/Gui/blips.ts index fafe56b6..d51f72c7 100644 --- a/ReallifeGamemode.Client/Gui/blips.ts +++ b/ReallifeGamemode.Client/Gui/blips.ts @@ -8,15 +8,12 @@ export default function playerBlips() { mp.events.add("entityStreamIn", (entity) => { if (entity.type === "player") { - - try { - mp.gui.chat.push("Player recieved: Yes --> ColorID :" + entity.data.blipColor); - } catch (e) { - //E - - } + mp.gui.chat.push("Player recieved: Yes"); let color = parseInt(entity.getVariable("blipColor")); + mp.gui.chat.push("Color : " + color); if (entity.blip == 0) entity.createBlip(1); + mp.gui.chat.push(parseInt(entity.blip) == 0 ? "Blip was not created" : "Blip was created"); + entity.setBlipColor(isNaN(color) ? 0 : color); mp.game.invoke(Natives.SET_BLIP_CATEGORY, entity.blip, 7); mp.game.invoke(Natives.SHOW_HEADING_INDICATOR_ON_BLIP, entity.blip, true); @@ -27,8 +24,10 @@ export default function playerBlips() { mp.events.addDataHandler("blipColor", (entity, value) => { if (entity.type === "player") { + mp.gui.chat.push("Setting Blip color..."); let color = parseInt(value); entity.setBlipColor(isNaN(color) ? 0 : color); + mp.gui.chat.push("Player blip color was set."); } }); } \ No newline at end of file