next
This commit is contained in:
@@ -8,15 +8,12 @@
|
|||||||
export default function playerBlips() {
|
export default function playerBlips() {
|
||||||
mp.events.add("entityStreamIn", (entity) => {
|
mp.events.add("entityStreamIn", (entity) => {
|
||||||
if (entity.type === "player") {
|
if (entity.type === "player") {
|
||||||
|
mp.gui.chat.push("Player recieved: Yes");
|
||||||
try {
|
|
||||||
mp.gui.chat.push("Player recieved: Yes --> ColorID :" + entity.data.blipColor);
|
|
||||||
} catch (e) {
|
|
||||||
//E
|
|
||||||
|
|
||||||
}
|
|
||||||
let color = parseInt(entity.getVariable("blipColor"));
|
let color = parseInt(entity.getVariable("blipColor"));
|
||||||
|
mp.gui.chat.push("Color : " + color);
|
||||||
if (entity.blip == 0) entity.createBlip(1);
|
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);
|
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);
|
||||||
mp.game.invoke(Natives.SHOW_HEADING_INDICATOR_ON_BLIP, entity.blip, true);
|
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) => {
|
mp.events.addDataHandler("blipColor", (entity, value) => {
|
||||||
if (entity.type === "player") {
|
if (entity.type === "player") {
|
||||||
|
mp.gui.chat.push("Setting Blip color...");
|
||||||
let color = parseInt(value);
|
let color = parseInt(value);
|
||||||
entity.setBlipColor(isNaN(color) ? 0 : color);
|
entity.setBlipColor(isNaN(color) ? 0 : color);
|
||||||
|
mp.gui.chat.push("Player blip color was set.");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user