juaosilv Posted July 25, 2019 Share 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) Link to comment
Other Languages Moderators Lord Henry Posted July 25, 2019 Other Languages Moderators Share 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 Link to comment
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