Add ItemShop, fix ClotheShop Payment, fix Vehicle Respawn, Add Vehicle Lock from outside
This commit is contained in:
@@ -21,23 +21,27 @@ export default function inventory(globalData: GlobalData): void {
|
||||
mp.events.add('showVehInventory', () => {
|
||||
invBrowser.execute(`execVehInv();`);
|
||||
});
|
||||
|
||||
var open = false;
|
||||
mp.events.add('inventoryShow', (iWeight, iNameArr, iAmountArr, iIdArr, playersArr) => {
|
||||
if (!globalData.InMenu) {
|
||||
|
||||
if (invBrowser === null) {
|
||||
|
||||
mp.gui.cursor.show(true, true);
|
||||
invBrowser = mp.browsers.new('package://assets/html/inventory/inventory.html');
|
||||
Players = playersArr;
|
||||
itemIdArr = iIdArr;
|
||||
itemAmountArr = iAmountArr;
|
||||
itemNameArr = iNameArr;
|
||||
invWeight = iWeight;
|
||||
if (!globalData.InMenu) {
|
||||
globalData.InMenu = true;
|
||||
mp.gui.cursor.show(true, true);
|
||||
invBrowser = mp.browsers.new('package://assets/html/inventory/inventory.html');
|
||||
Players = playersArr;
|
||||
itemIdArr = iIdArr;
|
||||
itemAmountArr = iAmountArr;
|
||||
itemNameArr = iNameArr;
|
||||
invWeight = iWeight;
|
||||
}
|
||||
} else {
|
||||
|
||||
try {
|
||||
invBrowser.destroy()
|
||||
invBrowser = null;
|
||||
globalData.InMenu = false;
|
||||
}
|
||||
finally {
|
||||
mp.gui.cursor.show(false, false);
|
||||
@@ -45,7 +49,6 @@ export default function inventory(globalData: GlobalData): void {
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
var offer = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user