Doongogar Posted November 2, 2021 Share Posted November 2, 2021 então recentement tentei fazer um codigo com que o player consigo digitar um comando ai a hud dele seria escondida, e eu gostaria que esse nesse script fosse possivel detectar se a hud esta escondida ou não, e se estiver escondida executa a ação de mostar a hud novamente mais não está funcionando, gostaria de saber o porquê que não esta funcionando e como corrigir, codigo que fiz abaixo: function hud(thePlayer) local ativo = setPlayerHudComponentVisible(thePlayer, "all", false) if ativo then setPlayerHudComponentVisible(thePlayer, "all", true) end end addCommandHandler("hud", hud) Link to comment
Other Languages Moderators Lord Henry Posted November 4, 2021 Other Languages Moderators Share Posted November 4, 2021 Corrija a indentação. function TheHud() setPlayerHudComponentVisible("all", not isPlayerHudComponentVisible("clock")) end addCommandHandler("hud", TheHud) Obs: Client-side Link to comment
Doongogar Posted November 5, 2021 Author Share Posted November 5, 2021 3 hours ago, Lord Henry said: Corrija a indentação. function TheHud() setPlayerHudComponentVisible("all", not isPlayerHudComponentVisible("clock")) end addCommandHandler("hud", TheHud) Obs: Client-side fica dando este erro repetidas vezes, oque seria? Link to comment
Other Languages Moderators androksi Posted November 6, 2021 Other Languages Moderators Share Posted November 6, 2021 O código é client-side, como o Lord Henry disse. Provavelmente você manteve no 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