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) => {
|
||||
if (!globalData.InMenu) {
|
||||
if (invBrowser !== null) {
|
||||
try {
|
||||
invBrowser.destroy()
|
||||
invBrowser = null;
|
||||
} finally {
|
||||
mp.gui.cursor.show(false, false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
mp.gui.cursor.show(true, true);
|
||||
@@ -29,9 +32,13 @@ export default function inventory(globalData: GlobalData): void {
|
||||
mp.events.add('inventoryShow', (itemIdArr1, itemAmountArr1) => {
|
||||
if (!globalData.InMenu) {
|
||||
if (invBrowser !== null) {
|
||||
try {
|
||||
invBrowser.destroy()
|
||||
invBrowser = null;
|
||||
}
|
||||
finally {
|
||||
mp.gui.cursor.show(false, false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user