Fixed js errors / warnings

This commit is contained in:
hydrant
2018-10-29 22:29:12 +01:00
parent 4b37067497
commit 705b4d38da

View File

@@ -49,7 +49,7 @@ mp.events.add("respawnDeathPlayer", () => {
}); });
mp.events.add("updateDutyMedics", (count) => { mp.events.add("updateDutyMedics", (count) => {
if (count == true) if (count === true)
{ {
dutyMedics++; dutyMedics++;
} }
@@ -70,11 +70,11 @@ mp.events.add("render", () => {
if (dutyMedics > 0) { if (dutyMedics > 0) {
medicString = "Derzeit sind ~g~" + dutyMedics + " Medics ~s~im Dienst ~c~und versuchen dich wiederzubeleben..."; medicString = "Derzeit sind ~g~" + dutyMedics + " Medics ~s~im Dienst ~c~und versuchen dich wiederzubeleben...";
} else { } else {
medicString = "Derzeit sind ~r~keine Medics ~s~im Dienst." medicString = "Derzeit sind ~r~keine Medics ~s~im Dienst.";
} }
deathSeconds = respawnTime - Math.floor(currentDate.getTime() / 1000); deathSeconds = respawnTime - Math.floor(currentDate.getTime() / 1000);
var alpha = fade + (Math.floor((currentDate.getTime() / 1000) - (deathDate.getTime() / 1000))); var alpha = fade + Math.floor(currentDate.getTime() / 1000 - deathDate.getTime() / 1000);
if (deathSeconds >= 0) { if (deathSeconds >= 0) {
mp.game.graphics.drawSprite("Mptattoos", "clearout", 0.625, 0.52, 0.1, 0.1, 0, 255, 255, 255, 236); mp.game.graphics.drawSprite("Mptattoos", "clearout", 0.625, 0.52, 0.1, 0.1, 0, 255, 255, 255, 236);
mp.game.graphics.drawText("Respawn in: ~y~" + deathSeconds, [0.5, 0.5], mp.game.graphics.drawText("Respawn in: ~y~" + deathSeconds, [0.5, 0.5],
@@ -83,14 +83,14 @@ mp.events.add("render", () => {
color: [255, 255, 255, 255], color: [255, 255, 255, 255],
scale: [0.8, 0.8], scale: [0.8, 0.8],
outline: true outline: true
}) });
mp.game.graphics.drawText(medicString, [0.5, 0.975], mp.game.graphics.drawText(medicString, [0.5, 0.975],
{ {
font: 4, font: 4,
color: [255, 255, 255, 255], color: [255, 255, 255, 255],
scale: [0.4, 0.4], scale: [0.4, 0.4],
outline: true outline: true
}) });
mp.game.graphics.drawRect(0.5, 0.5, 1, 1, 0, 0, 0, alpha); mp.game.graphics.drawRect(0.5, 0.5, 1, 1, 0, 0, 0, alpha);
} else { } else {