try fix
This commit is contained in:
@@ -9,17 +9,10 @@ export default function playerBlips() {
|
|||||||
|
|
||||||
mp.events.add("entityStreamIn", (entity) => {
|
mp.events.add("entityStreamIn", (entity) => {
|
||||||
if (entity.type === "player") {
|
if (entity.type === "player") {
|
||||||
|
|
||||||
var entityMp = <EntityMp>entity;
|
var entityMp = <EntityMp>entity;
|
||||||
|
|
||||||
|
|
||||||
let color = parseInt(entity.getVariable("blipColor"));
|
let color = parseInt(entity.getVariable("blipColor"));
|
||||||
|
|
||||||
|
|
||||||
entity.createBlip(1);
|
entity.createBlip(1);
|
||||||
|
|
||||||
var blip = entity.blip;
|
var blip = entity.blip;
|
||||||
|
|
||||||
entity.setBlipColor(isNaN(color) ? 0 : color);
|
entity.setBlipColor(isNaN(color) ? 0 : color);
|
||||||
|
|
||||||
mp.game.invoke(Natives.SET_BLIP_CATEGORY, entity.blip, 7);
|
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 = <BlipMp>entity.blip
|
||||||
|
blip.destroy();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
mp.events.addDataHandler("blipColor", (entity, value) => {
|
mp.events.addDataHandler("blipColor", (entity, value) => {
|
||||||
if (entity.type === "player") {
|
if (entity.type === "player") {
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ public static class AttachmentSync
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
entity.ResetSharedData("attachmentsData");
|
|
||||||
entity.SetData("Attachments", new List<uint>());
|
entity.SetData("Attachments", new List<uint>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user