Jump to content

[HELP] Hud glitching error


Recommended Posts

1 hour ago, #Heshan||eUNLOCK|| said:

dude wiki's script is doesnot work for my server 

sorry for my forum mistake

 

You're not meant to use the example given to you, you're meant to adapt it to your own personal usage and way. So for you want to hide the Default MTA Hud (GTA's), you'd hide the health, money, armor, weapon, wanted and clock. It would be best to disable it on when the player join's the server, server sided.

  • Like 1
Link to comment

Better to use this:

 

--This will disable original hud
function hideall(player)
    setPlayerHudComponentVisible ( "ammo", false )
	setPlayerHudComponentVisible ( "area_name", false )
    setPlayerHudComponentVisible ( "armour", false )
	setPlayerHudComponentVisible ( "breath", false )
	setPlayerHudComponentVisible ( "clock", false )
	setPlayerHudComponentVisible ( "health", false )
	setPlayerHudComponentVisible ( "money", false )
	setPlayerHudComponentVisible ( "vehicle_name", false )
	setPlayerHudComponentVisible ( "weapon", false )
end
addEventHandler ( "onClientResourceStart", getRootElement(), hideall )

 

Link to comment
On 7/22/2018 at 01:02, mazarati21 said:

Better to use this:

 


--This will disable original hud
function hideall(player)
    setPlayerHudComponentVisible ( "ammo", false )
	setPlayerHudComponentVisible ( "area_name", false )
    setPlayerHudComponentVisible ( "armour", false )
	setPlayerHudComponentVisible ( "breath", false )
	setPlayerHudComponentVisible ( "clock", false )
	setPlayerHudComponentVisible ( "health", false )
	setPlayerHudComponentVisible ( "money", false )
	setPlayerHudComponentVisible ( "vehicle_name", false )
	setPlayerHudComponentVisible ( "weapon", false )
end
addEventHandler ( "onClientResourceStart", getRootElement(), hideall )

 

what is the side client or server ? bro 

Link to comment

you need to hide just a HUD soo here (+ fixed a little bit):

function hide()
    setPlayerHudComponentVisible ( "ammo", false )
    setPlayerHudComponentVisible ( "armour", false )
	setPlayerHudComponentVisible ( "breath", false )
	setPlayerHudComponentVisible ( "clock", false )
	setPlayerHudComponentVisible ( "health", false )
	setPlayerHudComponentVisible ( "money", false )
	setPlayerHudComponentVisible ( "weapon", false )
end
addEventHandler ( "onClientResourceStart", resourceRoot, hide )

 

Link to comment

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...