Inventory System
This commit is contained in:
15
Client/Gui/Inventory/inventory.js
Normal file
15
Client/Gui/Inventory/inventory.js
Normal file
@@ -0,0 +1,15 @@
|
||||
var inventoryBrowser;
|
||||
|
||||
mp.events.add("showInventory", (show) => {
|
||||
if (show === true) {
|
||||
inventoryBrowser = mp.browsers.new('package://Gui/Inventory/inventory.html');
|
||||
mp.gui.chat.activate(false);
|
||||
mp.gui.cursor.show(true, true);
|
||||
} else {
|
||||
if (inventoryBrowser) {
|
||||
inventoryBrowser.destroy();
|
||||
mp.gui.chat.activate(true);
|
||||
mp.gui.cursor.show(false, false);
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user