juaosilv Posted July 25, 2019 Posted July 25, 2019 Olá, estou com alguns WARNINGS e queria saber como posso ajeitar. Bad argument @'processLineOfSight' expectec vector3 Esse ai tá dando em vários scripts quando eu clico em algum menu ou algo do itpo. Code: function render() local screenx, screeny, worldx, worldy, worldz = getCursorPosition() local px, py, pz = getCameraMatrix() local hit, x, y, z, elementHit = processLineOfSight ( px, py, pz, worldx, worldy, worldz ) local tx, ty, tz = getElementPosition(localPlayer) local rx, ry, rz = getElementPosition(ped1) local distancia = getDistanceBetweenPoints3D(tx, ty, tz, rx, ry, rz) if not isEventHandlerAdded("onClientRender", root, armas) then if (distancia < 5) then if hit then if elementHit == ped1 then triggerServerEvent("armasAbrir", localPlayer) end end end end end addEventHandler("onClientClick", root, render)
Moderators Lord Henry Posted July 25, 2019 Moderators Posted July 25, 2019 getCursorPosition retorna false quando o cursor não está visível. Antes da linha 2, coloque isso: if (not isCursorShowing ()) then return end Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now