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