fix servercrash taxifahrer

This commit is contained in:
Michael
2020-07-01 22:23:32 +02:00
parent 3c5cf9cd95
commit cef952487e
4 changed files with 20 additions and 5 deletions

View File

@@ -33,6 +33,13 @@ export default function taximeterInput(globalData: IGlobalData) {
myVar = setInterval(myTimer, 100);
});
mp.events.add('CLIENT:stopFare', () => {
browser.destroy()
browser = null;
globalData.InInput = false;
return;
});
function myTimer() {
if (totalPrice == lastPrice) return;
let payPrice = +totalPrice - +lastPrice;