Fix Medic 3
This commit is contained in:
@@ -13,8 +13,6 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
var screenRes = mp.game.graphics.getScreenResolution(0, 0);
|
||||
var player = mp.players.local;
|
||||
var tasks;
|
||||
var deathSeconds;
|
||||
var initTasks;
|
||||
var newTasks;
|
||||
var sorting = 0;
|
||||
var firstSorting = true;
|
||||
@@ -40,6 +38,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
/*mp.events.add("updateFactionBlips", (type, taskList) => {
|
||||
|
||||
});
|
||||
|
||||
});*/
|
||||
mp.events.add("showFactionInteractionLSPD", (userFactionId, isDuty, userFactionName, isFactionLeader) => {
|
||||
//LSPD
|
||||
@@ -280,13 +279,9 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
});
|
||||
|
||||
|
||||
mp.events.add("showMedicTasks", (type, taskList, deathTimes) => {
|
||||
mp.events.add("showMedicTasks", (type, taskList) => {
|
||||
|
||||
tasks = JSON.parse(taskList);
|
||||
deathSeconds = JSON.parse(deathTimes);
|
||||
if (sorting === 0) {
|
||||
initTasks = tasks;
|
||||
}
|
||||
|
||||
//mp.events.call("sortFactionTasks", false);
|
||||
|
||||
@@ -407,6 +402,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
mp.events.add("sortFactionTasks", (sortByKey) => {
|
||||
if (firstSorting) {
|
||||
sortText = "Nach Uhrzeit";
|
||||
@@ -462,7 +458,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});*/
|
||||
|
||||
function getDistance1(index) {
|
||||
return mp.game.gameplay.getDistanceBetweenCoords(player.position.x, player.position.y, player.position.z, newTasks[index].Position.x, newTasks[index].Position.y, newTasks[index].Position.z, true).toFixed(2);
|
||||
@@ -530,11 +526,11 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
var currentDate = new Date();
|
||||
|
||||
if (deadRespawned == false) {
|
||||
timeLeft = Math.round(Math.abs(Math.floor(currentDate.getTime() / 1000) - activeTask.TimeLeft - 60));
|
||||
if (timeLeft < 1) mp.events.call("cutMedicEarnings");
|
||||
//timeLeft = Math.round(Math.abs(Math.floor(currentDate.getTime() / 1000) - activeTask.TimeLeft - 60));
|
||||
if (activeTask.TimeLeft < 60) mp.events.call("cutMedicEarnings");
|
||||
} else {
|
||||
timeLeft = Math.round(Math.abs(Math.floor(currentDate.getTime() / 1000) - activeTask.TimeLeft - 120));
|
||||
if (timeLeft < 1) mp.events.call("destroyMedicTaskCheckpoint");
|
||||
if (activeTask.TimeLeft < 1) mp.events.call("destroyMedicTaskCheckpoint");
|
||||
}
|
||||
|
||||
if (deadRespawned == false) {
|
||||
|
||||
Reference in New Issue
Block a user