Sil3nT Posted April 8, 2014 Share Posted April 8, 2014 Hello everyone! I realy want to hide orginal GTA HUD and add custome one. Cuz when i add custome HUD the orginal wont disapear And this doesnt help. Or i just can make it correct https://wiki.multitheftauto.com/wiki/Sh ... dComponent Link to comment
Markeloff Posted April 8, 2014 Share Posted April 8, 2014 showPlayerHudComponent(all,false) Link to comment
Sil3nT Posted April 8, 2014 Author Share Posted April 8, 2014 (edited) And its on client side and looks like this? function show () showPlayerHudComponent(all,false) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource)),(show) Edited April 8, 2014 by Guest Link to comment
Karuzo Posted April 8, 2014 Share Posted April 8, 2014 Try to put it in an onClientRender Event so it's going to be disabled every frame. Link to comment
K4stic Posted April 8, 2014 Share Posted April 8, 2014 showPlayerHudComponent(all,false) the all is fail. correct it "all" showPlayerHudComponent( "all", false ) Link to comment
Sil3nT Posted April 9, 2014 Author Share Posted April 9, 2014 so like this in client side? function hudChanger () showPlayerHudComponent( "all", false ) end addEventHandler ( "onPlayerJoin", getRootElement(), hudChanger ) Link to comment
Sil3nT Posted April 9, 2014 Author Share Posted April 9, 2014 And yeah, btw. I test that custom HUD on my private server and its replacing the orginal one, but on my hosted Server it isnt. Why that? Ands host server is same as Private server! Link to comment
K4stic Posted April 9, 2014 Share Posted April 9, 2014 And yeah, btw.I test that custom HUD on my private server and its replacing the orginal one, but on my hosted Server it isnt. Why that? Ands host server is same as Private server! Easy because "onPlayerJoin" is server side and you use the showPlayerHudComponent like Client side so here is the Correct code: function hudChanger () showPlayerHudComponent( source, "all", false ) end addEventHandler ( "onPlayerJoin", getRootElement(), hudChanger ) The final Code is Server-side Link to comment
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