Jump to content

AlvarO

Members
  • Posts

    123
  • Joined

  • Last visited

Details

  • Gang
    Right

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

AlvarO's Achievements

Sucka

Sucka (13/54)

1

Reputation

  1. AlvarO

    M4 Animation

    Really got no idea, but maybe setWeaponProperty can help you.
  2. AlvarO

    AYUDA con panel

    Usa el evento que se dispara cuando se da el click, si es un botón de la librería por defecto de MTA este evento es: onClientGUIClick, si no, tienes que crear tu mismo el evento usando onClientClick y una función auxiliar tipo isMouseInPosition para chequear que el click es dentro de la posición deseada. Una vez hayas detectado el click, tan solo usa playSound para reproducir el sonido.
  3. El for está mal, deberias hacer AreaAguerra no devolver el tables[1]... ya que esto ve si cada objeto de la tabla es otra tabla y accede al índice que le indiques, pero al no ser estos elementos una tabla es como si quieres entrar en un coche por la puerta del conductor, pero no tienes coche. El loop lo que hace es que vas iterando i de forma que por cada elemento de la tabla AreaGuerra, vas aumentando i en 1. Yo simplemente, no haría el loop, y asignaria a cada variable el valor que le corresponde al solo tener un elemento en la tabla. También no has cerrado el loop, te falta un end. Espero haberte ayudado.
  4. En la misma función estás moviendo el objeto 2 veces y provoca que se quede como "raro", hay varias opciones, o hace una función para abrir con su comando, y otra para cerrar con su comando. También puedes hacer esto: OpenClose = createObject ( 968, 1544.7001953125, -1630.7998046875, 13.10000038147, 0, -90, -90 ) function CloseOpen(player, cmd, movimiento) if movimiento == "abrir" then moveObject (OpenClose, 968, 1544.7001953125, -1630.7998046875, 13.10000038147, 0, -90, -90 ) elseif movimiento == "cerrar" then moveObject (OpenClose, 968, 1544.6999511719, -1630.8000488281, 13.10000038147, 0, 90, 0 ) end addCommandHandler("puerta", CloseOpen) De forma que si escribes: /puerta abrir -> se abre, y si escribes /puerta cerrar -> se cierra. Espero haberte ayudado, si hay cualquier error cuéntanoslo.
  5. I found some days ago an API of the famous bot "Akinator" so I was wondering if there's any way to use it to create a bot in MTA using fetchRemote and so. The GitHub of the API is this: https://github.com/jgoralcz/aki-api
  6. I spoke too early, I started to script some minutes ago and after doing what you said I'm still having the same problem
  7. Hey guys, I'm having a problem since 2 weeks ago. The problem is, I'm playing MTA as always and there's no problem, it comes when i press ALT+TAB for changing of window for I don't know, check twitter, or changing music on spotify for example and I decide to return MTA. When I do it, MTA doesn't load, I can hear the sounds and everything but the video is not returning, when this happens, I go to task manager and close MTA. Is there any solution you can give me? Thanks.
  8. OH, THAT IS WHAT I'M SEARCHING FOR!! Thanks for your time guys! SOLVED
  9. Well, I know already about dgs' library, but the question is, is there any drawing function which makes the same? I mean, not using shaders.
  10. Hello guys, I'm trying to draw rounded rectangle on my script, but the question is, is there a way to modify the curvature of the corners? I mean, there's default curvature, but I would change it. Long time ago, there was a function which has an argument to modify this. This is the code I'm using: function roundedRectangle(x, y, w, h, borderColor, bgColor, postGUI) if (x and y and w and h) then if (not borderColor) then borderColor = tocolor(0, 0, 0, 200); end if (not bgColor) then bgColor = borderColor; end dxDrawRectangle(x, y, w, h, bgColor, postGUI); dxDrawRectangle(x + 2, y - 1, w - 4, 1, borderColor, postGUI); dxDrawRectangle(x + 2, y + h, w - 4, 1, borderColor, postGUI); dxDrawRectangle(x - 1, y + 2, 1, h - 4, borderColor, postGUI); dxDrawRectangle(x + w, y + 2, 1, h - 4, borderColor, postGUI); end end
  11. Hello, what I'm trying to do is output the songname of an internet radio. showRadioSongname function is for show the message
  12. I'm trying to add onClientRender event to a function for 5 seconds. When these 5 seconds has gone I want to remove it. This is what i made timer_1 = setTimer(showRadioSongName, 5000, 1) timer_11 = setTimer ( function() addEventHandler("onClientRender", getRootElement(), showRadioSongName) end, 5000, 1 ) if not isTimer(timer_1) and isTimer( timer_11 ) then killTimer( timer_1 ) killTimer( timer_11 ) removeEventHandler("onClientRender", getRootElement(), showRadioSongName) end
  13. I used all the info that wiki shows, and I don't have anything: local dot = dxCreateTexture(1, 1) function dxDrawRectangle3D(x,y,z,w,h,c,r,...) local lx, ly, lz = x+w, y+h, (z+tonumber(r or 0)) or z return dxDrawMaterialLine3D(x,y,z, lx, ly, lz, dot, h, c or tocolor(255,255,255,255), ...) end addEventHandler("onClientRender", root, function() dxDrawRectangle3D(0,0, 30, 100, 100, tocolor(255,255,255,255)) end )
×
×
  • Create New...