Sign in to follow this  
LilSoda

How to disable the default MTA HUD?

Recommended Posts

I got a custom hud in my MTA server,but the default one is glitching in it! How to disable the default one?

Share this post


Link to post

function disableNormalHUD()

 setPlayerHudComponentVisible("ammo", false)

 setPlayerHudComponentVisible("health", false)

 setPlayerHudComponentVisible("clock", false)

 setPlayerHudComponentVisible("money", false)

 setPlayerHudComponentVisible("wanted", false)

 setPlayerHudComponentVisible("weapon", false)

 -- Like that

end

addEventHandler("onClientResourceStart", resourceRoot, disableNormalHUD)

 

setPlayerHudComponentVisible

Share this post


Link to post
45 minutes ago, Leo Messi said:

function disableNormalHUD()

 setPlayerHudComponentVisible("ammo", false)

 setPlayerHudComponentVisible("health", false)

 setPlayerHudComponentVisible("clock", false)

 setPlayerHudComponentVisible("money", false)

 setPlayerHudComponentVisible("wanted", false)

 setPlayerHudComponentVisible("weapon", false)

 -- Like that

end

addEventHandler("onClientResourceStart", resourceRoot, disableNormalHUD)

 


setPlayerHudComponentVisible

where should i type this?

Share this post


Link to post

Best Way:
 

addEventHandler( "onClientResourceStart", getRootElement( ),
    function ()
        setPlayerHudComponentVisible ( localPlayer, "all", false )
    end
)

Insert this  into the top of your client side script (codeC.lua , sourceC.lua or something similar)

Share this post


Link to post

Please read thoroughly through this page in the wiki, it explains how you can start making your own scripts.

Or look up scripting on MTA on YouTube, here is a quick YouTube video I just found.

 

 I hope this helps you! :D

Edited by kieran

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.