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