fix press E in driving and planeschool

This commit is contained in:
Michael
2019-10-19 00:12:39 +02:00
parent 100d4c4f1e
commit b855b65675
2 changed files with 13 additions and 12 deletions

View File

@@ -33,15 +33,15 @@ export default function drivingSchoolHandle(globalData: GlobalData) {
keyBound = true; keyBound = true;
}); });
mp.events.add('removeDrivingSchoolMenu', (unbind) => { mp.events.add('removeDrivingSchoolMenu', () => {
mp.game.ui.clearHelp(true); mp.game.ui.clearHelp(true);
mp.gui.chat.show(true); if (mainMenu != null) {
mainMenu.Close();
}
if (keyBound && unbind) { if (keyBound) {
if (mainMenu) mainMenu.Close();
mp.keys.unbind(0x45, false, keyPressHandler);
keyBound = false; keyBound = false;
mp.keys.unbind(0x45, false, keyPressHandler);
} }
}); });

View File

@@ -33,15 +33,16 @@ export default function planeSchoolHandle(globalData: GlobalData) {
keyBound = true; keyBound = true;
}); });
mp.events.add('removeplaneSchoolMenu', (unbind) => { mp.events.add('removeplaneSchoolMenu', () => {
mp.game.ui.clearHelp(true); mp.game.ui.clearHelp(true);
mp.gui.chat.show(true); if (mainMenu != null) {
mainMenu.Close();
}
if (keyBound && unbind) { if (keyBound) {
if (mainMenu) mainMenu.Close();
mp.keys.unbind(0x45, false, keyPressHandler);
keyBound = false; keyBound = false;
mp.keys.unbind(0x45, false, keyPressHandler);
} }
}); });