Jump to content

Desativar e Ativar Hud Com Comando


Recommended Posts

Posted

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)

 

  • Other Languages Moderators
Posted

Corrija a indentação.

function TheHud()
    setPlayerHudComponentVisible("all", not isPlayerHudComponentVisible("clock"))
end
addCommandHandler("hud", TheHud)

Obs: Client-side

Posted
3 hours ago, Lord Henry said:

Corrija a indentação.

function TheHud()
    setPlayerHudComponentVisible("all", not isPlayerHudComponentVisible("clock"))
end
addCommandHandler("hud", TheHud)

Obs: Client-side

spacer.png

 

fica dando este erro repetidas vezes, oque seria?

  • Other Languages Moderators
Posted

O código é client-side, como o Lord Henry disse. Provavelmente você manteve no server-side.

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