Jump to content

aka Blue

Members
  • Posts

    2,106
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by aka Blue

  1. Está abierto actualmente pero con otra IP. Como no me paso mucho la verdad no le he prestado atención al post porque la gente tampoco le da mucha bola al foro de MTA. Gracias, estamos ahí.
  2. This does not exists and can't be destroyed: elementWeaponRaplace[source] Please, if you want help, post lines of code that we can understand.
  3. ¿Y todo es funcional? Me huele muy raro que en teoría una GM tan trabajada se venda a ese precio. No infravaloréis vuestro trabajo (es sólo un consejo). Mucha suerte! Tiene muy buena pinta.
  4. Apoyo a la gente con ambición pero estáis intentando prometer algo sin tener si quiera las bases mínimas para empezar. Suerte de todos modos!
  5. Eso es porque está por defecto el gamemode freeroam activado.
  6. Borra la carpeta gui de [Tu carpeta de MTA]-mods-deathmatch-resources PD: Por lo que leo, el problema está en tu velocidad de descarga que es bastante lenta pero debería funcionar.
  7. If you dont post your code lines we cant help you.
  8. @IIYAMA I will test it. Thank you so much anyway!
  9. One more thing. When I modify the browser with the size and position I want, the click detecting it's working wrong. Like, I need to click the left corner of the screen to search or something like that. local sx, sy = guiGetScreenSize() local x, y = ( sx / 1024 ), ( sy / 768 ) local ancho, alto = 500, 500 local webBrowser = createBrowser(x*ancho, y*alto, false, false) function webBrowserRender() dxDrawImage((sx-x*ancho)/2, (sy-y*alto)/2, x*ancho, y*alto, webBrowser, 0, 0, 0, tocolor(255,255,255,255), true) end function onKey(button) if button == "mouse_wheel_down" then injectBrowserMouseWheel(webBrowser, -40, 0) elseif button == "mouse_wheel_up" then injectBrowserMouseWheel(webBrowser, 40, 0) end end addEventHandler("onClientBrowserCreated", webBrowser, function() loadBrowserURL(webBrowser, "http://www.youtube.com") addEventHandler("onClientRender", root, webBrowserRender) function onCursorMove ( relativeX , relativeY , absoluteX , absoluteY ) injectBrowserMouseMove ( webBrowser , absoluteX , absoluteY ) end addEventHandler ( "onClientCursorMove" , root , onCursorMove ) addEventHandler("onClientKey", root, onKey) addEventHandler("onClientClick", root, function(button, state) if state == "down" then injectBrowserMouseDown(webBrowser, button) else injectBrowserMouseUp(webBrowser, button) end end) focusBrowser(webBrowser) end )
  10. So I want to do a simple YouTube simple to listen to music but I don't know what function or script use to inject text into a Browser. I'm using dxDrawImage to draw the browser because for me it's more editable. The mouse works perfectly but I need to make the keyboard work too. Thanks! --In order to render the browser on the full screen, we need to know the dimensions. local screenWidth, screenHeight = guiGetScreenSize() --Let's create a new browser in remote mode. local webBrowser = createBrowser(screenWidth, screenHeight, false, false) --Function to render the browser. function webBrowserRender() --Render the browser on the full size of the screen. dxDrawImage(0, 0, screenWidth, screenHeight, webBrowser, 0, 0, 0, tocolor(255,255,255,255), true) end --The event onClientBrowserCreated will be triggered, after the browser has been initialized. --After this event has been triggered, we will be able to load our URL and start drawing. addEventHandler("onClientBrowserCreated", webBrowser, function() --After the browser has been initialized, we can load www.youtube.com loadBrowserURL(webBrowser, "http://www.youtube.com") --Now we can start to render the browser. addEventHandler("onClientRender", root, webBrowserRender) function onCursorMove ( relativeX , relativeY , absoluteX , absoluteY ) injectBrowserMouseMove ( webBrowser , absoluteX , absoluteY ) end addEventHandler ( "onClientCursorMove" , root , onCursorMove ) addEventHandler("onClientKey", root, onKey) addEventHandler("onClientClick", root, function(button, state) if state == "down" then injectBrowserMouseDown(webBrowser, button) else injectBrowserMouseUp(webBrowser, button) end end) end ) function onKey(button) if button == "mouse_wheel_down" then injectBrowserMouseWheel(webBrowser, -40, 0) elseif button == "mouse_wheel_up" then injectBrowserMouseWheel(webBrowser, 40, 0) end end
  11. I think the problem is in the 7 line. getElementPosition returns 3 floats, not table values, so, you can't index them. PD: And... the loop is wrong.
  12. Debes reemplazar la textura con un shader.
  13. aka Blue

    Dx Fade Out

    Podrías utilizar https://wiki.multitheftauto.com/wiki/InterpolateBetween pero es más sencillo el ejemplo que te pondré abajo: local alpha = 255 -- El alpha inicial. Pongamosle 255 local cantidad_a_disminuir = 10 -- Vamos de 10 en 10 para abajo en cada frame. local desvaneciendo = false function dibujar() if desvaneciendo and alpha > 0 then -- Si el alphaInicial es mayor a 0, osea, es visible aun... alpha = math.max( alpha - 10, 0 ) -- Vamos bajandole 10 hasta llegar a 0 end end addEventHandler( "onClientRender", root, dibujar )
  14. No te va a funcionar. Para estas cosas debes hacer el arma invisible y sustituir un objeto que nunca vayas a usar en el sv por el arma. Deberías utilizar bone_attach para pegarlo al jugador y tal. Las armas de los jugadores no son objetos como tal hasta donde tengo entendido. Aquí tienes un script: https://github.com/Dante383/custom-weapons (no estoy seguro si se sigue desarrollando. No hace lo que digo arriba pero quizás te interese.)
  15. Debes buscar en la lista de interiores (si te refieres al mundo "negro"). En caso de que quieras pasar todos los objetos de un mapeo a otra dimension edita el archivo .map del mapeo y cambia la dimension. Yo sinceramente te recomendaría utilizar algún convertidor de mapas a .lua (hay uno online: http://mta.cemgokmen.com/converter/) y cargar el mapeo como un script. Una vez cargado el mapeo como script simplemente cambias la dimension de donde se crean los objetos y listo.
  16. local vehiculo = createVehicle( 602, -308.154296875, 1532.3466796875, 75.133796691895 ) -- creas el vehiculo setElementDimension( vehiculo, 12 ) -- Lo colocamos en la dimension 12 addEventHandler( "onVehicleExplode", vehiculo, -- Si explota... function() setTimer( respawnVehicle, 2000, 1, source ) -- Lo respawneamos tras 2 segundos aprox setElementDimension( source, 12 ) -- Por si acaso, lo metemos otra vez en la dimension 12 end )
  17. Deberías utilizar la función client-side onClientPedDamage (https://wiki.multitheftauto.com/wiki/OnClientPedDamage) y comprobar ya sea con tablas o elementData si el jugador tiene el comando activado para quitar daño.
  18. aka Blue

    Dx Rotation

    Para DX debes calcular las posiciones de tal forma que se ajuste a todas las resoluciones. Es algo más complicado que ponerle true al argumento relative de las GUI. Utiliza esto para dx, es lo que utilizo yo y me funciona de maravilla: local sx, sy = guiGetScreenSize() local x, y = ( sx / 1024 ), ( sy / 768 ) -- El 1024 y el 768 lo cambias por el ancho y alto de tu pantalla dxDrawRectangle( x*20, y*100, x*200, y*150, tocolor(255,255,255) ) -- Y para los textos y*escala
  19. aka Blue

    Dx Rotation

    Lo que tienes que hacer es primero dibujar la imagen base y debajo de esta la imagen que rota.
×
×
  • Create New...