Jump to content

Sasu

MTA Contributors
  • Posts

    1,056
  • Joined

  • Last visited

Everything posted by Sasu

  1. ¿createObject te devuelve false?
  2. Si, pero este thread es viejo...
  3. ¿Has intentado ejecutar la animacion 1 segundo mas tarde?
  4. Sasu

    XML problem

    Hey there! I have a problem getting value of a node. Here is the xml and script that I have: <div> <span class="title"><strong>Alan Walker</strong> – Faded (Amice Remix)</span> <em>(4:34)</em> </div> local node = xmlNodeGetChildren(xml, 0) if xmlNodeGetName(node) == "span" then songName = xmlNodeGetValue(node) outputChatBox(tostring(songName)) artist = xmlNodeGetValue(xmlNodeGetChildren(node, 0)) end It returns the artist(inside node) correctly but for some reason the song name is not returned anything. I think '–' might have something to do with. Hope you can help me guys, thanks.
  5. Sasu

    Adivina la funcion

    getPedBonePosition ¿Que funcion me dice si un elemento esta esperando a que se cargue el suelo?
  6. Porque ese sí viene con la libreria DirectX.
  7. Sasu

    Adivina la funcion

    setPedOxygenLevel ¿Que función utilizo para saber si el jugador esta agachado?
  8. Show us how you modified the code.
  9. Sasu

    Adivina la funcion

    ¿Que función se utiliza para obtener el lenguaje que el jugador tiene configurado?
  10. If you still need it, I made a custom one using as base a code by ZoRRoM^ and this other code from gta forums(http://gtaforums.com/topic/835347-rotating-camera/?p=1068327127). local rotX, rotY, rotRadius, maxRadius = 0, -math.pi/2, 10, 20 local isCustomCamera = false local cameraTarget = nil local sX, sY = guiGetScreenSize() addEventHandler("onClientPreRender", root, function() if isCustomCamera and isElement(cameraTarget) then local x, y, z = getElementPosition( cameraTarget ) local cx, cy, cz cx = x + rotRadius * math.sin(rotY) * math.cos(rotX) cy = y + rotRadius * math.sin(rotY) * math.sin(rotX) cz = z + rotRadius * math.cos(rotY) local hit, hitX, hitY, hitZ = processLineOfSight(x, y, z, cx, cy, cz, _, false, _, _, _, _, _, _, cameraTarget) if hit then cx, cy, cz = hitX, hitY, hitZ end setCameraMatrix( cx, cy, cz, x, y, z ) end end ) addEventHandler("onClientKey", root, function(button) if button == "mouse_wheel_up" then rotRadius = math.max(2, rotRadius - 1) elseif button == "mouse_wheel_down" then rotRadius = math.min(maxRadius, rotRadius + 1) end end ) addEventHandler("onClientCursorMove", root, function(cX,cY,aX,aY) if isCursorShowing() or isMTAWindowActive() then return end aX = aX - sX/2 aY = aY - sY/2 rotX = rotX - aX * 0.01745 * 0.3 rotY = math.min(-0.02, math.max( rotY + aY * 0.01745 * 0.3, -3.11 ) ) end ) function setCustomCameraTarget(element) if isElement(element) then cameraTarget = element isCustomCamera = true return true else cameraTarget = nil isCustomCamera = false end end Use setCustomCameraTarget function, for example: setCustomCameraTarget(localPlayer)
  11. Por lo que tengo entendido, te da las coordenadas donde impactaron las balas, misiles, etc.
  12. Try this: dxDrawImageSection(screenW * 0.6340, screenH * 0.0130, screenW * 0.3551, screenH * 0.5534, 0, 0, (getElementHealth(localPlayer)*425)/100, 425, ":DayZ/images/health.png", 0, 0, 0, tocolor(r, g, b, 170), false)
  13. Puedes utilizar los argumentos hitX, hitY y hitZ poniendo la condicion de si existe hitElement, o sino pueded utilizar onClientPlayerDamage que te devuelve que parte del cuerpo(no exacto) fue dañada.
  14. You're modifying the width of the image but not the width of the section you're taking from the image.
  15. Sasu

    Quote string

    Lo habra escrito a las apuradas. Correctamente seria: print( ("mi nombre es: %s"):format("Pedrito") );
  16. Sasu

    Quote string

    Como cualquier otra string. Cierras los corchetes, punto punto, variable, etc.
  17. Post the code you have because it seems to be that it's still trying to connect to mysql.
  18. No, también puede ser un jugador remoto.
  19. A mi me funciona perfectamente, lo que pasa es que algunos videos deben ser procesadas por primera vez y tardan, pero luego de unos segundos puedes volver a reproducir el video y funciona.
  20. Remplaza la linea 9: cinturon [ player ] = cinturon [ player ] or {}
  21. En vez de table.insert, simplemente haces: cinturon[player] = {} cinturon[player][slot] = {arma = arma, municion = municion}
  22. No queria revivir este post, pero ya que lo hiciste quisiera mencionar que getCursorPosition retorna las coordenadas relativas y no absoluta, un dato a tener en cuenta si usas valores absolutos.
×
×
  • Create New...