[+] Add Driving License to Interaction Menu and as 'Object' to show other Players via the Interaction menu

This commit is contained in:
Lukas Moungos
2019-11-02 18:36:17 +01:00
parent e3c3949f1b
commit c46c778a47
14 changed files with 296 additions and 26 deletions

View File

@@ -24,7 +24,17 @@ export default function inventory(globalData: GlobalData): void {
mp.events.add('inventoryShow', (iWeight, iNameArr, iAmountArr, iIdArr, playersArr) => {
if (!globalData.InMenu) {
if (invBrowser !== null) {
if (invBrowser === null) {
mp.gui.cursor.show(true, true);
Players = playersArr;
itemIdArr = iIdArr;
itemAmountArr = iAmountArr;
itemNameArr = iNameArr;
invWeight = iWeight;
} else {
try {
invBrowser.destroy()
invBrowser = null;
@@ -33,16 +43,8 @@ export default function inventory(globalData: GlobalData): void {
mp.gui.cursor.show(false, false);
}
return;
}
mp.gui.cursor.show(true, true);
Players = playersArr;
itemIdArr = iIdArr;
itemAmountArr = iAmountArr;
itemNameArr = iNameArr;
invWeight = iWeight;
invBrowser = mp.browsers.new("package://assets/html/inventory/inventory.html");
}
});
var offer = 0;