Jump to content

How to disable the default MTA HUD?


LilSoda

Recommended Posts

Posted

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
Posted
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?

Posted

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)

Posted (edited)

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...