Jump to content

ERRO CAMERA MATRIX


Recommended Posts

Posted

Estou com um Problema de o Seguinte, Estou Fazendo um Sistema de Personagens, e Preciso que Quando a Pessoa Entre no servidor apareça o Meu Dx com a Camera Matrix, em um Lugar Especifico, o Dx em Si Está Funcionando Normalmente Mais a Camera Matrix está com Problema de a Camera ficar toda Preta.

Li alguns tópicos sobre isso e vi sobre o [ download_priority_group ] No Meta, Funcionou mais Quando Desligo o Freeroam, Já Continua o Mesmo Problema, Queria Estar Perguntando se Existe alguma Solução Para Isso.

DISCORD : LucasST#1725 ?

DÚVIDAS ESTOU SEMPRE A DISPOSIÇÃO

Posted (edited)

Consegui resolver esse problema, só que agr para não criar outro tópico estou com mais duvida, como posso estar sabendo se terminou o download para iniciar a camera matrix ?

Edited by LucasST

DISCORD : LucasST#1725 ?

DÚVIDAS ESTOU SEMPRE A DISPOSIÇÃO

Posted
function checkTransfer()
    if isTransferBoxActive() then
        outputChatBox("Transfer Box Ativa")
        fadeCamera(false)
    else
        if timer and isTimer(timer) then
            killTimer(timer)
            triggerServerEvent("ST:SetagemSerial",localPlayer)
            fadeCamera(true)
        end
    end
end
timer = setTimer(checkTransfer,500,0)

Fiz desse jeito e deu certo vlw ❤️

DISCORD : LucasST#1725 ?

DÚVIDAS ESTOU SEMPRE A DISPOSIÇÃO

  • Moderators
Posted

Se me permite um comentário acerca de boas práticas de programação, não utilize else e depois if separados. Faça com elseif.

function checkTransfer()
    if isTransferBoxActive() then
        outputChatBox ("Transfer Box Ativa")
        fadeCamera (false)
    elseif timer and isTimer (timer) then
        killTimer (timer)
        triggerServerEvent ("ST:SetagemSerial", localPlayer)
        fadeCamera (true)
    end
end
timer = setTimer (checkTransfer, 500, 0)

 

Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanksspacer.png

Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile
Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment
Discord Oficial do MTA: https://mtasa.com/discord
Blacklist e Whitelist de Scripters: Planilha

Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.

Posted
On 06/01/2021 at 13:25, Lord Henry said:

Se me permite um comentário acerca de boas práticas de programação, não utilize else e depois if separados. Faça com elseif.


function checkTransfer()
    if isTransferBoxActive() then
        outputChatBox ("Transfer Box Ativa")
        fadeCamera (false)
    elseif timer and isTimer (timer) then
        killTimer (timer)
        triggerServerEvent ("ST:SetagemSerial", localPlayer)
        fadeCamera (true)
    end
end
timer = setTimer (checkTransfer, 500, 0)

 

O else foi usado para o isTransferBoxActive, ai o if timer foi apenas uma verificação para ver se o timer existe pq ocorreu erros no debug de o timer não existir.

DISCORD : LucasST#1725 ?

DÚVIDAS ESTOU SEMPRE A DISPOSIÇÃO

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