vXHazE Posted November 16, 2015 Posted November 16, 2015 Hi, I want to mod in a different hud and every time i mod one in the original one and the moded one overlap can anyone help me btw i dont know a lot about scripting. :D
Tekken Posted November 17, 2015 Posted November 17, 2015 It's beter to use setPlayerHudComponentVisible as showPlayerHudComponent is deprecated.
vXHazE Posted November 18, 2015 Author Posted November 18, 2015 ive tried to make my own script like the wiki said to do but im not any good at scripting and it doesn't work
iPrestege Posted November 18, 2015 Posted November 18, 2015 -- #ServerSide addEventHandler ( "onPlayerJoin", root, function ( ) setPlayerHudComponentVisible ( source, "all", false ) end ) It's very simple to hide it just use the event when the player join and the function to hide all the hud as it's in the Wiki.
vXHazE Posted November 19, 2015 Author Posted November 19, 2015 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
Tekken Posted November 20, 2015 Posted November 20, 2015 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>
vXHazE Posted November 21, 2015 Author Posted November 21, 2015 Cheers for helping me but this doesn't work either
Rockyz Posted November 21, 2015 Posted November 21, 2015 Check Your Files and The Meta addEventHandler ( "onPlayerJoin", root, function ( ) setPlayerHudComponentVisible ( source, "all", false ); end; );
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now