Como faço pra ocultar o hud, radar e level na hora de logar? (só aparecer quando fizer o login ou registro)
Codigo do Painel (server)
addEvent('Schootz.registrar', true)
addEventHandler('Schootz.registrar', root,
function (player, account, password)
if tostring(account) and tostring(passaword) then
if #account >= 4 and #password >= 4 then
if not string.find(account, ' ') and not string.find(password, ' ') then
if #getAccountsBySerial(getPlayerSerial(player)) < config.contas then
if not getAccount(account) then
if addAccount(account, password) then
local accountdata = getAccount(account)
logIn(player, accountdata, password)
exports['FR_DxMessagesLOGIN']:addBox(player, "Conta criada com sucesso!, Bem-vindo(a).", "success")
setPlayerHudComponentVisible(player, "radar", true)
triggerClientEvent(player, 'Schootz.RemoveLogin', player)
setCameraTarget(player, player)
fadeCamera(player, true)
else
exports['FR_DxMessagesLOGIN']:addBox(player, "Erro ao criar sua conta, contate a administração.", "error")
end
else
exports['FR_DxMessagesLOGIN']:addBox(player, "Essa conta já existe.", "error")
end
else
exports['FR_DxMessagesLOGIN']:addBox(player, "Você já registrou o máximo de contas possíveis.", "error")
end
else
exports['FR_DxMessagesLOGIN']:addBox(player, "Não pode existir espaços no usuario e senha.", "error")
end
else
exports['FR_DxMessagesLOGIN']:addBox(player, "Minimo de 4 caracteres para a senha e úsuario.", "error")
end
else
exports['FR_DxMessagesLOGIN']:addBox(player, "Digite os dados corretamente.", "error")
end
end
)
addEvent('Schootz.logar', true)
addEventHandler('Schootz.logar', root,
function (player, user, password, check)
local account = getAccount(user, password)
if account then
logIn(player, account, password)
triggerClientEvent(player, 'Schootz.saveLoginToXML', player, user, password)
exports['FR_DxMessagesLOGIN']:addBox(player, "Logado com sucesso, Bem-vindo(a).", "success")
setPlayerHudComponentVisible(player, "radar", true)
setElementData(player, "BloquearHUD", false)
setElementData(player, "BloquearHUD1", false)
setCameraTarget(player, player)
fadeCamera(player, true)
triggerClientEvent(player, 'Schootz.RemoveLogin', player)
else
exports['FR_DxMessagesLOGIN']:addBox(player, "Essa conta não existe.", "error")
end
end)