Merge branch 'develop' of ssh://development.life-of-german.org:451/log-gtav/reallife-gamemode into develop

This commit is contained in:
hydrant
2020-03-13 23:02:37 +01:00
6 changed files with 19 additions and 16 deletions

View File

@@ -8,6 +8,7 @@ const PRICE_KM = document.getElementById("taximeter-price-kilometer");
const KILOMETER = document.getElementById("taximeter-kilometer");
function updateKilometer(km) {
lastKilometer = +lastKilometer + +km;
UpdateTotalPrice();
KILOMETER.innerHTML = (Math.round((lastKilometer + Number.EPSILON) * 1000) / 1000).toString();
}
@@ -15,9 +16,8 @@ function updateKilometer(km) {
function UpdateTotalPrice() {
var TotalPrice = +lastKilometer * + price;
console.log(+lastKilometer * + price);
TOTAL_PRICE.innerHTML = Math.floor(TotalPrice).toString();
//mp.trigger("CEF:updateLastPrice", Math.floor(TotalPrice), Math.round((lastKilometer + Number.EPSILON) * 1000) / 1000);
mp.trigger("CEF:updateLastPrice", Math.floor(TotalPrice), Math.round((lastKilometer + Number.EPSILON) * 1000) / 1000);
}
function updateFarePrice() {