fix press E in driving and planeschool
This commit is contained in:
@@ -33,15 +33,15 @@ export default function drivingSchoolHandle(globalData: GlobalData) {
|
||||
keyBound = true;
|
||||
});
|
||||
|
||||
mp.events.add('removeDrivingSchoolMenu', (unbind) => {
|
||||
mp.events.add('removeDrivingSchoolMenu', () => {
|
||||
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);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user