Sani Erweiterung
This commit is contained in:
@@ -25,6 +25,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
var ambulanceImagePos;
|
||||
var rangeLeft;
|
||||
var sortText;
|
||||
var deadRespawned = false;
|
||||
|
||||
var ticketName: string;
|
||||
var pointsName: string;
|
||||
@@ -462,6 +463,22 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
function getDistance2(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);
|
||||
}
|
||||
mp.events.add("checkPointTimeout", () => {
|
||||
activeTask = false;
|
||||
activeCheckpoint.destroy();
|
||||
});
|
||||
mp.events.add("cutMedicEarnings", () => {
|
||||
deadRespawned = true;
|
||||
});
|
||||
|
||||
mp.events.add('playerEnterColshape', (activeCheckpoint) => {
|
||||
if (deadRespawned == true) {
|
||||
activeTask = false;
|
||||
activeCheckpoint.destroy();
|
||||
mp.events.callRemote("delReviveTask");
|
||||
mp.events.callRemote("payCutMedicEarnings");
|
||||
}
|
||||
});
|
||||
|
||||
mp.events.add('render', () => {
|
||||
if (activeTask) {
|
||||
@@ -486,7 +503,6 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
} else {
|
||||
activeTask = false;
|
||||
activeCheckpoint.destroy();
|
||||
mp.events.callRemote("delHealTask");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user