Jump to content

Desativar e Ativar Hud Com Comando


Recommended Posts

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

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