Spc Posted April 22, 2018 Posted April 22, 2018 Hey, I want to disable custom HUD (my own created) with command /showhud. These functions didn't work: addCommandHandler onPlayerCommand isPlayerHudComponentVisible("radar") Any sollution?
Moderators Patrick Posted April 22, 2018 Moderators Posted April 22, 2018 Send me the full code. community profile | map converters | map images | pDownloader | pAttach | model encrypter
LilDawage Posted April 22, 2018 Posted April 22, 2018 we need you code RPG/CnR servers Developer , You want help ? contact me on discord >>>lilDawage#8508<<< i'm at your Service 10/24 hours 7/7 days , >>>Welcome<<< Asking Discord Channel JOIN US ON here , you are welcome 10/24 active
Spc Posted April 22, 2018 Author Posted April 22, 2018 (edited) Code: addEventHandler("onClientRender", getRootElement(), function() if getElementData(localPlayer, "auth:uid") then if isPlayerHudComponentVisible("radar") then -- the hiding don't work -- some DX draw end end end) Edited April 22, 2018 by Spc
Moderators Patrick Posted April 22, 2018 Moderators Posted April 22, 2018 (edited) local show = true addEventHandler("onClientRender", getRootElement(), function() if show and getElementData(localPlayer, "auth:uid") then -- some DX draw end end) addCommandHandler("showhud", function() show = not show end) Edited April 22, 2018 by Patrick2562 community profile | map converters | map images | pDownloader | pAttach | model encrypter
Spc Posted April 22, 2018 Author Posted April 22, 2018 21 minutes ago, Patrick2562 said: local show = true addEventHandler("onClientRender", getRootElement(), function() if show and getElementData(localPlayer, "auth:uid") then -- some DX draw end end) addCommandHandler("showhud", function() show = not show end) Don't work.
Moderators Patrick Posted April 22, 2018 Moderators Posted April 22, 2018 function render() if getElementData(localPlayer, "auth:uid") then -- some DX draw end end addEventHandler("onClientRender", getRootElement(), render) local show = true addCommandHandler("showhud", function() if show then removeEventHandler("onClientRender", getRootElement(), render) else addEventHandler("onClientRender", getRootElement(), render) end show = not show end) 1 community profile | map converters | map images | pDownloader | pAttach | model encrypter
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now