Add ItemShop, fix ClotheShop Payment, fix Vehicle Respawn, Add Vehicle Lock from outside

This commit is contained in:
Siga
2020-02-03 18:13:10 +01:00
parent be6ef1cf1c
commit 154b0ca0fe
42 changed files with 1920 additions and 50 deletions

View File

@@ -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;