mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 16:23:21 +00:00
improvement(client/hud): Setup a proper function for clearing the hud, instead of sending multiple NUI messages
This commit is contained in:
@@ -41,6 +41,11 @@
|
||||
ESX.refreshHUD();
|
||||
};
|
||||
|
||||
ESX.resetHUDElements = function () {
|
||||
ESX.HUDElements = [];
|
||||
ESX.refreshHUD();
|
||||
};
|
||||
|
||||
ESX.refreshHUD = function () {
|
||||
$('#hud').html('');
|
||||
|
||||
@@ -95,6 +100,11 @@
|
||||
break;
|
||||
}
|
||||
|
||||
case 'resetHUDElements': {
|
||||
ESX.resetHUDElements();
|
||||
break;
|
||||
}
|
||||
|
||||
case 'inventoryNotification': {
|
||||
ESX.inventoryNotification(data.add, data.item, data.count);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user