mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 16:23:21 +00:00
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:
+7
-5
@@ -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 @@
|
||||
});
|
||||
};
|
||||
|
||||
})();
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user