add service ruf sanitäter
This commit is contained in:
@@ -30,6 +30,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
var pointsName: string;
|
||||
|
||||
var factionInteractionMenu;
|
||||
var healTaskMenuMedic;
|
||||
var reviveTaskMenuMedic;
|
||||
|
||||
/*mp.events.add("updateFactionBlips", (type, taskList) => {
|
||||
@@ -184,9 +185,10 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
healTaskMenuMedic.SetRightLabel(hPM + healTaskCountMedic)
|
||||
factionInteractionMenu.AddItem(healTaskMenuMedic);
|
||||
|
||||
fireTaskMenuMedic = new UIMenuItem("Feuerauftr\u00e4ge");
|
||||
/*fireTaskMenuMedic = new UIMenuItem("Feuerauftr\u00e4ge"); //wenn die funktion dafür vorhanden ist wird das wieder eingebunden
|
||||
fireTaskMenuMedic.SetRightLabel(fPM + fireTaskCountMedic);
|
||||
factionInteractionMenu.AddItem(fireTaskMenuMedic);
|
||||
factionInteractionMenu.AddItem(fireTaskMenuMedic);
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
@@ -211,6 +213,12 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
mp.gui.chat.activate(true);
|
||||
globalData.InMenu = false;
|
||||
break;
|
||||
case healTaskMenuMedic:
|
||||
mp.events.callRemote("loadMedicTasks", 1)
|
||||
factionInteractionMenu.Close();
|
||||
mp.gui.chat.activate(true);
|
||||
globalData.InMenu = false;
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -286,7 +294,56 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
});
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
healTaskMenuMedic = new Menu("Heal", "\u00c4lteste zu erst", new Point(0, screenRes.y / 2), null, null);
|
||||
let aTask1;
|
||||
for (var i = 0; i < tasks.length; i++) {
|
||||
if (tasks[i].MedicName === "none") {
|
||||
aTask1 = new UIMenuItem("~g~" + tasks[i].Victim);
|
||||
} else {
|
||||
aTask1 = new UIMenuItem("~r~" + tasks[i].Victim);
|
||||
}
|
||||
|
||||
aTask1.SetRightLabel(mp.game.gameplay.getDistanceBetweenCoords(player.position.x, player.position.y, player.position.z, tasks[i].Position.x, tasks[i].Position.y, tasks[i].Position.z, true).toFixed(2).toString() + " ~g~m");
|
||||
healTaskMenuMedic.AddItem(aTask1);
|
||||
}
|
||||
|
||||
let backItem1 = new UIMenuItem("Zur\u00fcck", "Zur\u00fcck zur Fraktionsinteraktion.");
|
||||
backItem1.BackColor = new Color(213, 0, 0);
|
||||
backItem1.HighlightedBackColor = new Color(229, 57, 53);
|
||||
healTaskMenuMedic.AddItem(backItem1);
|
||||
|
||||
healTaskMenuMedic.ItemSelect.on((item, index) => {
|
||||
if (item === backItem1) {
|
||||
healTaskMenuMedic.Close();
|
||||
factionInteractionMenu.Visible = true;
|
||||
} else {
|
||||
if (tasks[index].MedicName === "none") {
|
||||
mp.game.graphics.requestStreamedTextureDict("medicimages", true);
|
||||
mp.events.callRemote("updateMedicTask", 1, index, player.name);
|
||||
mp.game.ui.setNewWaypoint(tasks[index].Position.x, tasks[index].Position.y);
|
||||
activeCheckpoint = mp.markers.new(1, new mp.Vector3(tasks[index].Position.x, tasks[index].Position.y, tasks[index].Position.z - 2), 3.0, {
|
||||
color: [255, 0, 0, 150],
|
||||
visible: true,
|
||||
dimension: 0
|
||||
});
|
||||
healTaskMenuMedic.Close();
|
||||
mp.gui.chat.activate(true);
|
||||
globalData.InMenu = false;
|
||||
ambulanceImagePos = 0.325
|
||||
taskStart = player.position;
|
||||
taskFinish = tasks[index].Position;
|
||||
taskRange = mp.game.gameplay.getDistanceBetweenCoords(player.position.x, player.position.y, player.position.z, tasks[index].Position.x, tasks[index].Position.y, tasks[index].Position.z, true);
|
||||
activeTask = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
healTaskMenuMedic.Open();
|
||||
|
||||
healTaskMenuMedic.MenuClose.on(() => {
|
||||
healTaskMenuMedic.Visible = false;
|
||||
globalData.InMenu = false;
|
||||
});
|
||||
case 2:
|
||||
break;
|
||||
}
|
||||
@@ -379,6 +436,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
} else {
|
||||
activeTask = false;
|
||||
activeCheckpoint.destroy();
|
||||
mp.events.callRemote("delHealTask");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user