Skip to content

Commit

Permalink
Merge pull request #81 from itIsMaku/hud-toggle-expose
Browse files Browse the repository at this point in the history
feat(client/main): hud toggle fun expose
  • Loading branch information
Gellipapa authored Jun 8, 2024
2 parents bd38251 + 8ac3928 commit a1a8410
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ function HUD:Start(xPlayer)
self:Toggle(true)
end

local function ToggleHud(state)
HUD:Toggle(state)
HUD.Data.hudHidden = not state
end

RegisterNetEvent('esx_hud:HudToggle', ToggleHud)
exports('HudToggle', ToggleHud)

-- Handlers
-- On script start
AddEventHandler("onResourceStart", function(resource)
Expand Down

0 comments on commit a1a8410

Please sign in to comment.