- - ESX HUD Toggle Script Addon - -
This small addon to the es_extended resource allows you to toggle the HUD displayed automatically by es_extended.
How Does It Work?
The default hotkey to toggle the HUD is F9, however this can be changed to suit your control layout.
HUD Toggled ON:
HUD Toggled OFF:
How Do I Install?
There are 2 options to installing this script addon, either copy the code below and place it in yourself OR download the github of my version of es_extended and replace your one.
1st Option:
Copy this code and place it in es_extended\client\main.lua at the line 418 mark just after this:
^^ It does NOT have to be placed exactly after this, however it is nice to have next to this as they both toggle the HUD in given circumstances.
-- Toggle HUD Hotkey
Toggle=true
if Config.EnableHud then
Citizen.CreateThread(function()
while true do
Citizen.Wait(1)
if IsControlJustPressed(0, Keys['F9']) and Toggle == true then
Toggle = false
TriggerEvent('es:setMoneyDisplay', 0.0)
ESX.UI.HUD.SetDisplay(0.0)
elseif IsControlJustPressed(0, Keys['F9']) and Toggle == false then
Toggle = true
TriggerEvent('es:setMoneyDisplay', 1.0)
ESX.UI.HUD.SetDisplay(1.0)
end
end
end)
end
2nd Option:
Download my version of ex_extended and replace your version with this new one, once you have done so, you should be good to go if you do not wish to change anything. This is recommended for beginners who are not so good at coding:
I am also working on getting this addon script to work with other ESX resources, so it toggles all HUDâs from all resources, tell me which resources you would like me to create HUD toggles for next!
Permission from ESX creator to release script addon: