diff --git a/client/frameworks.lua b/client/frameworks.lua index 09afc5b..d4a8464 100644 --- a/client/frameworks.lua +++ b/client/frameworks.lua @@ -15,7 +15,8 @@ if GetResourceState('ox_core'):find('start') then RegisterNetEvent('ox:playerLogout', function() PlayerLoaded = false - SendMessage('toggleHud', false) + HUD = false + SendMessage('toggleHud', HUD) end) AddEventHandler('ox:statusTick', function(values) @@ -38,7 +39,8 @@ if GetResourceState('es_extended'):find('start') then RegisterNetEvent('esx:onPlayerLogout') AddEventHandler('esx:onPlayerLogout', function() PlayerLoaded = false - SendMessage('toggleHud', false) + HUD = false + SendMessage('toggleHud', HUD) end) AddEventHandler('esx_status:onTick', function(data) diff --git a/shared/init.lua b/shared/init.lua index 504fe2b..fb2d7b7 100644 --- a/shared/init.lua +++ b/shared/init.lua @@ -78,6 +78,7 @@ if not IsDuplicityVersion() then end HUD = true + SendMessage('toggleHud', HUD) end AddEventHandler('onResourceStart', function(resourceName)