blips test
This commit is contained in:
@@ -8,12 +8,11 @@
|
||||
export default function playerBlips() {
|
||||
|
||||
mp.events.add("entityStreamIn", (entity) => {
|
||||
mp.game.wait(500);
|
||||
mp.game.wait(100);
|
||||
if (entity.type === "player") {
|
||||
var entityMp = <EntityMp>entity;
|
||||
let color = parseInt(entity.getVariable("blipColor"));
|
||||
entity.createBlip(1);
|
||||
var blip = entity.blip;
|
||||
if (entity.blip == 0) entity.createBlip(1);
|
||||
|
||||
entity.setBlipColor(isNaN(color) ? 0 : color);
|
||||
|
||||
mp.game.invoke(Natives.SET_BLIP_CATEGORY, entity.blip, 7);
|
||||
@@ -25,18 +24,10 @@ export default function playerBlips() {
|
||||
});
|
||||
|
||||
|
||||
mp.events.add("entityStreamOut", (entity) => {
|
||||
if (entity.type === "player") {
|
||||
entity.blip = null;
|
||||
}
|
||||
});
|
||||
|
||||
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