Jump to content

Problema no fadeCamera


Recommended Posts

Posted

Estou com um problema com isso, alguém que poderia me ajudar please?

WARNING: Teleport\teleports.lua:6: Bad argument @ 'fadeCamera' [Expected element at argument 1]

commando = { }
tempo = 1000

function tele (thePlayer)
    fadeCamera(thePlayer, false, 0.5)
    setTimer(fadeCamera, 1000, 1, thePlayer, true)
    if (commando[thePlayer]) then
        return
    end
    setTimer( function(thePlayer)
    if not (isElement(thePlayer)) then return end
        setElementPosition ( thePlayer, 2501, -1674, 13 )
    end, tempo, 1, thePlayer)
        commando[thePlayer] = true
    setTimer( function()
        commando[thePlayer] = false
    end, tempo*2, 1)
end
addCommandHandler ( "cj", tele )

 

  • Moderators
Posted

Esse script é server-side ou client-side?

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.

  • Moderators
Posted

Coloque isso antes da linha do fadeCamera:

if not isElement (thePlayer) then return end

 

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.

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