mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-02 19:28:52 +00:00
improvement(client/hud): Setup a proper function for clearing the hud, instead of sending multiple NUI messages
This commit is contained in:
@@ -142,12 +142,9 @@ ESX.UI.HUD.RemoveElement = function(name)
|
||||
end
|
||||
|
||||
ESX.UI.HUD.Reset = function()
|
||||
for i=1, #ESX.UI.HUD.RegisteredElements, 1 do
|
||||
SendNUIMessage({
|
||||
action = 'deleteHUDElement',
|
||||
name = ESX.UI.HUD.RegisteredElements[i]
|
||||
})
|
||||
end
|
||||
SendNUIMessage({
|
||||
action = 'resetHUDElements'
|
||||
})
|
||||
ESX.UI.HUD.RegisteredElements = {}
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user