*MedicFix, +New Gangzone Editor
This commit is contained in:
@@ -18,7 +18,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
var newTasks;
|
||||
var sorting = 0;
|
||||
var firstSorting = true;
|
||||
var activeTask = false;
|
||||
var activeTask = null;
|
||||
var activeCheckpoint;
|
||||
var taskStart;
|
||||
var taskFinish;
|
||||
@@ -327,7 +327,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
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(0, 0, 75),
|
||||
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
|
||||
@@ -340,7 +340,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
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;
|
||||
activeTask = tasks[index];
|
||||
|
||||
}
|
||||
}
|
||||
@@ -383,7 +383,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
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(0, 0, 75),
|
||||
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
|
||||
@@ -395,7 +395,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
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;
|
||||
activeTask = tasks[index];
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -481,18 +481,22 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
|
||||
mp.events.add("destroyMedicTaskCheckpoint", () => {
|
||||
activeCheckpoint.destroy();
|
||||
activeTask = false;
|
||||
activeTask = null;
|
||||
timeLeft = 0;
|
||||
mp.events.callRemote("MedicTaskTimeout");
|
||||
});
|
||||
|
||||
mp.events.add('playerEnterCheckpoint', (activeCheckpoint) => {
|
||||
if (deadRespawned == true) {
|
||||
activeCheckpoint.destroy();
|
||||
activeCheckpoint.destroy();
|
||||
mp.events.callRemote("PayCutMedicEarnings");
|
||||
activeTask = false;
|
||||
deadRespawned = false;
|
||||
activeTask = null;
|
||||
deadRespawned = false;
|
||||
timeLeft = 0;
|
||||
} else if (activeTask.Type == 1){
|
||||
activeCheckpoint.destroy();
|
||||
activeTask = null;
|
||||
mp.events.callRemote("delHealTask");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user