Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
fix: HUD not loading on relog
Browse files Browse the repository at this point in the history
  • Loading branch information
demxnn committed Mar 17, 2023
1 parent 1b7d7cb commit 66fe8d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/frameworks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
1 change: 1 addition & 0 deletions shared/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ if not IsDuplicityVersion() then
end

HUD = true
SendMessage('toggleHud', HUD)
end

AddEventHandler('onResourceStart', function(resourceName)
Expand Down

0 comments on commit 66fe8d4

Please sign in to comment.