Jump to content

How can i disable the hud?


LilSoda

Recommended Posts

 

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

 

Edited by mazarati21
  • Thanks 1
Link to comment
9 hours ago, mazarati21 said:

 


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

 

Where should i type that?

Where should i type that?

Link to comment
2 hours ago, Juuve said:

client.lua


addEventHandler("onClientResourceStart",resourceRoot,function()
	setPlayerHudComponentVisible("all",false)
	setPlayerHudComponentVisible("crosshair",true)
end)

meta.xml


<meta>
	<info author="JeViCo" description="" version="1.0" type="script" />
	<script src="hud.lua" type="client" cache="false"/>
</meta>

 

in which folder should i make a folder with meta.xml and client.lua?

???

  • Thanks 1
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...