-
Posts
1,056 -
Joined
-
Last visited
Posts posted by Sasu
-
-
Haz un for-loop
-
Pitagoras?
Si, pero este thread es viejo...
-
¿Has intentado ejecutar la animacion 1 segundo mas tarde?
-
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.
-
¿Que funcion me dice si un elemento esta esperando a que se cargue el suelo?
-
Porque ese sí viene con la libreria DirectX.
-
¿Que función utilizo para saber si el jugador esta agachado?
-
Show us how you modified the code.
-
¿Que función se utiliza para obtener el lenguaje que el jugador tiene configurado?
-
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)
-
Por lo que tengo entendido, te da las coordenadas donde impactaron las balas, misiles, etc.
-
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)
-
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.
-
You're modifying the width of the image but not the width of the section you're taking from the image.
-
Lo habra escrito a las apuradas. Correctamente seria:
print( ("mi nombre es: %s"):format("Pedrito") );
-
Como cualquier otra string. Cierras los corchetes, punto punto, variable, etc.
-
Post the code you have because it seems to be that it's still trying to connect to mysql.
-
Ami me da que no, ya que emplear "source" se refiere al mismo "localPlayer".
No, también puede ser un jugador remoto.
-
-
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.
-
Muy bueno!
-
Remplaza la linea 9:
cinturon [ player ] = cinturon [ player ] or {}
-
En vez de table.insert, simplemente haces:
cinturon[player] = {} cinturon[player][slot] = {arma = arma, municion = municion}
-
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.
Optimizar mapas y lag
in Scripting
Posted
¿createObject te devuelve false?