Fix rework

This commit is contained in:
VegaZ
2021-02-11 19:58:08 +01:00
parent 5c993dfe7d
commit 93b5fdeecc

View File

@@ -522,26 +522,27 @@ export default function factionInteraction(globalData: IGlobalData) {
var currentDate = new Date(); var currentDate = new Date();
if (deadRespawned == false) { if (deadRespawned == false) {
timeLeft = Math.abs(deathTime - 30 - Math.floor(currentDate.getTime() / 1000)); timeLeft = Math.round(Math.abs(deathTime - 30 - Math.floor(currentDate.getTime() / 1000)));
if (timeLeft < 1) mp.events.call("cutMedicEarnings");
} else { } else {
timeLeft = Math.abs(deathTime - 60 - Math.floor(currentDate.getTime() / 1000)); timeLeft = Math.round(Math.abs(deathTime - 60 - Math.floor(currentDate.getTime() / 1000)));
if (timeLeft < 0) mp.events.call("destroyMedicTaskCheckpoint"); if (timeLeft < 1) mp.events.call("destroyMedicTaskCheckpoint");
} }
if (deadRespawned == false) { if (deadRespawned == false) {
mp.game.graphics.drawText(timeLeft.toString() + "s", [0.5, 0.85], { mp.game.graphics.drawText(timeLeft.toString() + "s " + deathTime + "..." + deathTime.toString(), [0.5, 0.88], {
font: 7, font: 7,
color: [60, 179, 113, 255], color: [60, 179, 113, 255],
scale: [0.2, 0.2], scale: [0.3, 0.3],
outline: true, outline: true,
centre: true centre: true
}); });
} else { } else {
{ {
mp.game.graphics.drawText(timeLeft.toString() + "s", [0.5, 0.85], { mp.game.graphics.drawText(timeLeft.toString() + "s" + deathTime + "..." + deathTime.toString(), [0.5, 0.88], {
font: 7, font: 7,
color: [255, 203, 145, 255], color: [255, 203, 145, 255],
scale: [0.2, 0.2], scale: [0.3, 0.3],
outline: true, outline: true,
centre: true centre: true
}); });