next
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user