try fix inventory
This commit is contained in:
@@ -11,9 +11,12 @@ export default function inventory(globalData: GlobalData): void {
|
|||||||
mp.events.add("openTradeWindow", (money1, itemIdArr1, itemAmountArr1) => {
|
mp.events.add("openTradeWindow", (money1, itemIdArr1, itemAmountArr1) => {
|
||||||
if (!globalData.InMenu) {
|
if (!globalData.InMenu) {
|
||||||
if (invBrowser !== null) {
|
if (invBrowser !== null) {
|
||||||
invBrowser.destroy()
|
try {
|
||||||
invBrowser = null;
|
invBrowser.destroy()
|
||||||
mp.gui.cursor.show(false, false);
|
invBrowser = null;
|
||||||
|
} finally {
|
||||||
|
mp.gui.cursor.show(false, false);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
@@ -29,9 +32,13 @@ export default function inventory(globalData: GlobalData): void {
|
|||||||
mp.events.add('inventoryShow', (itemIdArr1, itemAmountArr1) => {
|
mp.events.add('inventoryShow', (itemIdArr1, itemAmountArr1) => {
|
||||||
if (!globalData.InMenu) {
|
if (!globalData.InMenu) {
|
||||||
if (invBrowser !== null) {
|
if (invBrowser !== null) {
|
||||||
invBrowser.destroy()
|
try {
|
||||||
invBrowser = null;
|
invBrowser.destroy()
|
||||||
mp.gui.cursor.show(false, false);
|
invBrowser = null;
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
mp.gui.cursor.show(false, false);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user