From 93b5fdeecc9712b9d4f8c58ff16a80e71d00e028 Mon Sep 17 00:00:00 2001 From: VegaZ Date: Thu, 11 Feb 2021 19:58:08 +0100 Subject: [PATCH] Fix rework --- .../Interaction/factioninteraction.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ReallifeGamemode.Client/Interaction/factioninteraction.ts b/ReallifeGamemode.Client/Interaction/factioninteraction.ts index 07963b90..14f489ba 100644 --- a/ReallifeGamemode.Client/Interaction/factioninteraction.ts +++ b/ReallifeGamemode.Client/Interaction/factioninteraction.ts @@ -522,26 +522,27 @@ export default function factionInteraction(globalData: IGlobalData) { var currentDate = new Date(); 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 { - timeLeft = Math.abs(deathTime - 60 - Math.floor(currentDate.getTime() / 1000)); - if (timeLeft < 0) mp.events.call("destroyMedicTaskCheckpoint"); + timeLeft = Math.round(Math.abs(deathTime - 60 - Math.floor(currentDate.getTime() / 1000))); + if (timeLeft < 1) mp.events.call("destroyMedicTaskCheckpoint"); } 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, color: [60, 179, 113, 255], - scale: [0.2, 0.2], + scale: [0.3, 0.3], outline: true, centre: true }); } 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, color: [255, 203, 145, 255], - scale: [0.2, 0.2], + scale: [0.3, 0.3], outline: true, centre: true });