[HOTFIX] v0.0.3-h1
fix bug at LSED checkpoint fix Message for Cops
This commit is contained in:
@@ -35,9 +35,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
var reviveTaskMenuMedic;
|
||||
var insDate;
|
||||
/*mp.events.add("updateFactionBlips", (type, taskList) => {
|
||||
|
||||
});
|
||||
|
||||
});*/
|
||||
mp.events.add("showFactionInteractionLSPD", (userFactionId, isDuty, userFactionName, isFactionLeader) => {
|
||||
//LSPD
|
||||
@@ -64,8 +62,6 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
TaskMenuLSPD.SetRightLabel("");
|
||||
factionInteractionMenu.AddItem(TaskMenuLSPD);*/ //weiteres
|
||||
|
||||
|
||||
|
||||
let cancelItem = new UIMenuItem("Schlie\u00dfen", "Schlie\u00dft die Fraktionsinteraktion.");
|
||||
cancelItem.BackColor = new Color(213, 0, 0);
|
||||
cancelItem.HighlightedBackColor = new Color(229, 57, 53);
|
||||
@@ -108,7 +104,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
factionInteractionMenu.Visible = false;
|
||||
mp.gui.chat.activate(true);
|
||||
globalData.InMenu = false;
|
||||
mp.events.callRemote("CLIENT:wantedlist");
|
||||
mp.events.callRemote("CLIENT:wantedlist");
|
||||
break;
|
||||
}
|
||||
});
|
||||
@@ -172,7 +168,6 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
var wList;
|
||||
|
||||
mp.events.add("showWantedlist", (playersJson) => {
|
||||
|
||||
if (wantedlistBrowser !== null) {
|
||||
wantedlistBrowser.destroy();
|
||||
wantedlistBrowser = null;
|
||||
@@ -193,7 +188,6 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
});
|
||||
|
||||
mp.events.add("removeWantedlist", () => {
|
||||
|
||||
if (wantedlistBrowser == null) {
|
||||
return;
|
||||
}
|
||||
@@ -212,7 +206,6 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
mp.gui.chat.activate(false);
|
||||
globalData.InMenu = true;
|
||||
|
||||
|
||||
var rPM = ((reviveTaskCountMedic === "0") ? "~r~" : "~g~");
|
||||
var hPM = ((healTaskCountMedic === "0") ? "~r~" : "~g~");
|
||||
var fPM = ((fireTaskCountMedic === "0") ? "~r~" : "~g~");
|
||||
@@ -236,9 +229,8 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
|
||||
/*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);
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,9 +269,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
mp.events.add("showMedicTasks", (type, taskList) => {
|
||||
|
||||
tasks = JSON.parse(taskList);
|
||||
|
||||
//mp.events.call("sortFactionTasks", false);
|
||||
@@ -316,12 +306,12 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
mp.events.callRemote("updateMedicTask", 0, tasks[index].Victim);
|
||||
mp.game.ui.setNewWaypoint(tasks[index].Position.x, tasks[index].Position.y);
|
||||
activeCheckpoint = mp.checkpoints.new(1, new mp.Vector3(tasks[index].Position.x, tasks[index].Position.y, tasks[index].Position.z - 2), 3.0,
|
||||
{
|
||||
{
|
||||
direction: new mp.Vector3(tasks[index].Position.x, tasks[index].Position.y, tasks[index].Position.z - 5),
|
||||
color: [255, 0, 0, 150],
|
||||
visible: true,
|
||||
dimension: 0
|
||||
});
|
||||
});
|
||||
reviveTaskMenuMedic.Close();
|
||||
mp.gui.chat.activate(true);
|
||||
globalData.InMenu = false;
|
||||
@@ -370,12 +360,12 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
mp.events.callRemote("updateMedicTask", 1, tasks[index].Victim);
|
||||
mp.game.ui.setNewWaypoint(tasks[index].Position.x, tasks[index].Position.y);
|
||||
activeCheckpoint = mp.checkpoints.new(1, new mp.Vector3(tasks[index].Position.x, tasks[index].Position.y, tasks[index].Position.z - 2), 3.0,
|
||||
{
|
||||
direction: new mp.Vector3(tasks[index].Position.x, tasks[index].Position.y, tasks[index].Position.z - 5),
|
||||
color: [255, 0, 0, 150],
|
||||
visible: true,
|
||||
dimension: 0
|
||||
});
|
||||
{
|
||||
direction: new mp.Vector3(tasks[index].Position.x, tasks[index].Position.y, tasks[index].Position.z - 5),
|
||||
color: [255, 0, 0, 150],
|
||||
visible: true,
|
||||
dimension: 0
|
||||
});
|
||||
healTaskMenuMedic.Close();
|
||||
mp.gui.chat.activate(true);
|
||||
globalData.InMenu = false;
|
||||
@@ -423,7 +413,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
mp.events.call("showMedicTasks", 0, JSON.stringify(initTasks));
|
||||
break;
|
||||
|
||||
case 1: //Sortierung nach Metern (aufsteigend)
|
||||
case 1: //Sortierung nach Metern (aufsteigend)
|
||||
for (var d = 0; d < tasks.length; d++) {
|
||||
for (var e = 0; e < tasks.length - 1; e++) {
|
||||
if (getDistance1(e) > getDistance2(e + 1)) {
|
||||
@@ -440,7 +430,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
mp.events.call("showMedicTasks", 0, JSON.stringify(tasks));
|
||||
break;
|
||||
|
||||
//case 2: //Sortierung nach Metern (absteigend)
|
||||
//case 2: //Sortierung nach Metern (absteigend)
|
||||
// mp.gui.chat.push("Sorting 2");
|
||||
// sortText = "Entfernung absteigend";
|
||||
// break;
|
||||
@@ -468,13 +458,13 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
deadRespawned = true;
|
||||
});
|
||||
|
||||
mp.events.add("destroyMedicTaskCheckpoint", () => {
|
||||
if (activeCheckpoint) {
|
||||
activeCheckpoint.destroy();
|
||||
mp.events.add("destroyMedicTaskCheckpoint", () => {
|
||||
if (activeCheckpoint && mp.checkpoints.exists(activeCheckpoint)) {
|
||||
activeCheckpoint.destroy();
|
||||
activeCheckpoint = null;
|
||||
activeTask = null;
|
||||
timeLeft = null;
|
||||
mp.events.callRemote("MedicTaskTimeout");
|
||||
mp.events.callRemote("MedicTaskTimeout");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -486,7 +476,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
activeTask = null;
|
||||
deadRespawned = false;
|
||||
timeLeft = null;
|
||||
} else if (activeTask.Type == 1){
|
||||
} else if (activeTask.Type == 1) {
|
||||
activeCheckpoint.destroy();
|
||||
activeCheckpoint = null;
|
||||
mp.events.callRemote("delHealTaskAsMedic", activeTask.Victim);
|
||||
@@ -502,7 +492,6 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
});
|
||||
|
||||
mp.events.add('render', () => {
|
||||
|
||||
if (activeTask) {
|
||||
rangeLeft = mp.game.gameplay.getDistanceBetweenCoords(player.position.x, player.position.y, player.position.z, taskFinish.x, taskFinish.y, taskFinish.z, true).toFixed(2);
|
||||
if (rangeLeft > 1.9) {
|
||||
|
||||
Reference in New Issue
Block a user