Jump to content

How to disable the hud for money, health weapons


vXHazE

Recommended Posts

i put this on the server.lau

addEventHandler ( "onPlayerJoin", root,

function ( )

setPlayerHudComponentVisible ( source, "all", false )

end

)

on meta i put

and on client i put

local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted" }

addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),

function ()

for _, component in ipairs( components ) do

setPlayerHudComponentVisible( component, false )

end

end)

and it doesn't work :(

Link to comment

You definitely did something wrong!

Also you don't need the client version, this one should be enough:

Server.lua

addEventHandler("onPlayerJoin", getRootElement(), function() 
    setPlayerHudComponentVisible(source, "all", false); 
end);  

meta.xml

<meta> 
    <info author="POWA" version="1.0" type="script"/> 
    <script src="server.lua" type="server"/> 
</meta> 

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