...................
This commit is contained in:
@@ -40,8 +40,6 @@ mp.game.vehicle.defaultEngineBehaviour = false;
|
||||
|
||||
require('./Gui/house');
|
||||
|
||||
InputHelper.startDisableTimer();
|
||||
|
||||
import vehicleEntering from './vehiclesync/entering';
|
||||
vehicleEntering(globalData);
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ export default class InputHelper {
|
||||
|
||||
static active: boolean = false;
|
||||
|
||||
static timerStarted: boolean = false;
|
||||
|
||||
constructor(title: string, globalData?: IGlobalData) {
|
||||
this.title = title;
|
||||
this.data = globalData || GlobalData;
|
||||
@@ -27,14 +29,18 @@ export default class InputHelper {
|
||||
this.value = undefined;
|
||||
}
|
||||
|
||||
static startDisableTimer(): void {
|
||||
startDisableTimer(): void {
|
||||
mp.gui.chat.push("RENDER REGISTRIEREN");
|
||||
mp.events.add("render", () => {
|
||||
|
||||
game.ui.sendChatMessage("render in inputhelper");
|
||||
|
||||
if (InputHelper.active) {
|
||||
mp.game.controls.disableAllControlActions(0);
|
||||
mp.game.controls.disableAllControlActions(1);
|
||||
mp.game.controls.disableAllControlActions(2);
|
||||
mp.game.controls.disableAllControlActions(27);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -52,6 +58,12 @@ export default class InputHelper {
|
||||
this.created = true;
|
||||
this.browser = mp.browsers.new('package://assets/html/inputhelper/index.html');
|
||||
InputHelper.active = true;
|
||||
|
||||
if (!InputHelper.timerStarted) {
|
||||
InputHelper.timerStarted = true;
|
||||
this.startDisableTimer();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private finish() {
|
||||
|
||||
Reference in New Issue
Block a user