Don't parse item object to client, added weapon component notifications (more see desc)

- Removed xPlayer .displayBank()
- Fixed issues with giving weapon using commands
- Modified ESX.UI.ShowInventoryItemNotification() to take string instead of table
- Minor adjustments and variable renames
- Fixed lower case weapons not droppable
- Removed /disconnect command becasue fivem implemented their own
This commit is contained in:
ElPumpo
2020-01-20 14:33:24 +01:00
parent 17b19893c9
commit cd1ce6a849
5 changed files with 93 additions and 77 deletions
+7 -5
View File
@@ -22,7 +22,6 @@
};
ESX.updateHUDElement = function (name, data) {
for (let i = 0; i < ESX.HUDElements.length; i++) {
if (ESX.HUDElements[i].name == name) {
ESX.HUDElements[i].data = data;
@@ -51,7 +50,7 @@
}
};
ESX.inventoryNotification = function (add, item, count) {
ESX.inventoryNotification = function (add, label, count) {
let notif = '';
if (add) {
@@ -60,10 +59,13 @@
notif += '-';
}
notif += count + ' ' + item.label;
if (count) {
notif += count + ' ' + label;
} else {
notif += ' ' + label;
}
let elem = $('<div>' + notif + '</div>');
$('#inventory_notifications').append(elem);
$(elem).delay(3000).fadeOut(1000, function () {
@@ -105,4 +107,4 @@
});
};
})();
})();