diff --git a/ReallifeGamemode.Client/Gui/blips.ts b/ReallifeGamemode.Client/Gui/blips.ts index 44eca82f..7aa0cb81 100644 --- a/ReallifeGamemode.Client/Gui/blips.ts +++ b/ReallifeGamemode.Client/Gui/blips.ts @@ -9,17 +9,10 @@ export default function playerBlips() { mp.events.add("entityStreamIn", (entity) => { if (entity.type === "player") { - var entityMp = entity; - - let color = parseInt(entity.getVariable("blipColor")); - - entity.createBlip(1); - var blip = entity.blip; - entity.setBlipColor(isNaN(color) ? 0 : color); mp.game.invoke(Natives.SET_BLIP_CATEGORY, entity.blip, 7); @@ -31,7 +24,12 @@ export default function playerBlips() { }); - + mp.events.add("entityStreamOut", (entity) => { + if (entity.type === "player") { + var blip = entity.blip + blip.destroy(); + } + }); mp.events.addDataHandler("blipColor", (entity, value) => { if (entity.type === "player") { diff --git a/ReallifeGamemode.Server/Util/AttachmentSync.cs b/ReallifeGamemode.Server/Util/AttachmentSync.cs index cfa403ef..6021b912 100644 --- a/ReallifeGamemode.Server/Util/AttachmentSync.cs +++ b/ReallifeGamemode.Server/Util/AttachmentSync.cs @@ -97,7 +97,6 @@ public static class AttachmentSync } } - entity.ResetSharedData("attachmentsData"); entity.SetData("Attachments", new List()); }