Xperia Posted October 8, 2012 Share Posted October 8, 2012 Tengo este dxline: function laser() dxDrawLine3D ( 226.80000305176, 1874, 13.39999961853, 226.80000305176, 1870.8000488281, 13.39999961853, tocolor(250,0,0,150) ) end addEventHandler("onClientRender",getRootElement(),laser) Y quisiera que al tocarlo haga un createExplosion.Que debo usar: isLineOfSightClear o processLineOfSight ¿Y como?No entiendo muy bien estas 2 funciones. Link to comment
Alexs Posted October 8, 2012 Share Posted October 8, 2012 Si solo quieres saber que un elemento toque el laser, usa isLineOfSightClear, si quieres profundizar mas y tenes una ID o Modelo del elemento, processLineOfSight. Link to comment
Xperia Posted October 8, 2012 Author Share Posted October 8, 2012 Usare isLineOfSightClear. EDIT: Ya me crea la explosion en el laser, pero repetidamente.Intento ponerle checkPlayers pero nada, me dice "unexpected symbol near [". function laser() dxDrawLine3D ( 226.80000305176, 1874, 13.39999961853, 226.80000305176, 1870.8000488281, 13.39999961853, tocolor(250,0,0,150) ) detector = processLineOfSight( 226.80000305176, 1874, 13.39999961853, 226.80000305176, 1870.8000488281, 13.39999961853, [checkPlayers = true] ) if detector then createExplosion( 226.80000305176, 1874, 13.39999961853, 6 ) end end addEventHandler("onClientRender",getRootElement(),laser) Link to comment
Renkon Posted October 8, 2012 Share Posted October 8, 2012 modifica [checkPlayers=true] por true Link to comment
Xperia Posted October 8, 2012 Author Share Posted October 8, 2012 Nada, con el true solo no funciona. Link to comment
Renkon Posted October 8, 2012 Share Posted October 8, 2012 https://wiki.multitheftauto.com/wiki/processLineOfSight Lee lo que retorna. Link to comment
Recommended Posts