Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/02/20 in all areas

  1. ¡Hola, gente! Hoy nuevamente, les traigo un nuevo vídeo tutorial, el cual trata sobre ¿Como crear cajas de texto (editbox) en MTA con dxDrawing? ¡Espero que les guste! He cambiado los links de los videos, debido a que he mudado los tutoriales de mi Canal principal de YouTube, a mi canal Secundario. Debido a que mi canal principal ahora se enfoca en Gaming. Cualquier otro tutorial que crean necesario de hacer y no lo ven en mi canal, pueden decirme en privado o por el Grupo de Discord donde frecuento estar. ¡Un Saludo!
    1 point
  2. Here some code snippets I ripped out of one of my scripts. The code was used to calculate the new projectile position based on frame time. This would terminate different projectile speeds based on FPS. -- add function findRotation local findRotation = function ( x1, y1, x2, y2 ) local t = -math.deg( math.atan2( x2 - x1, y2 - y1 ) ) return t < 0 and t + 360 or t end -- add function findPitch local findPitch = function (camerax,cameray,cameraz,pointx,pointy,pointz) local dX=camerax-pointx local dY=cameraz-pointz local dZ=cameray-pointy local pitch=math.atan2(dY,math.sqrt(math.pow(dZ,2) + math.pow(dX,2))); return pitch end local xr, yr, zr = getElementRotation(source, "ZXY") -- source is projectile -- xr, yr, zr is saved inside of projectileData.rotation local targetX, targetY, targetZ = getElementPosition(target) -- target is projectile local rotZ = findRotation(newX, newY, targetX, targetY) + 180 local pitch = findPitch(newX, newY, newZ, targetX, targetY, targetZ) local rotX = pitch*(180/math.pi) local newRotX = projectileData.rotation.x local newRotZ = projectileData.rotation.z local rotationDistanceX = (projectileData.rotation.x - rotX + 360) % 360; if (rotationDistanceX > 180) then rotationDistanceX = 360 - rotationDistanceX newRotX = newRotX + math.min(rotationDistanceX, behaviourData.rotationSpeed * speedMultiplier) else newRotX = newRotX + -math.min(rotationDistanceX, behaviourData.rotationSpeed * speedMultiplier) end local rotationDistanceZ = (projectileData.rotation.z - rotZ + 360) % 360; if (rotationDistanceZ > 180) then rotationDistanceZ = 360 - rotationDistanceZ newRotZ = newRotZ + math.min(rotationDistanceZ, behaviourData.rotationSpeed * speedMultiplier) else newRotZ = newRotZ + -math.min(rotationDistanceZ, behaviourData.rotationSpeed * speedMultiplier) end projectileData.rotation.x = newRotX projectileData.rotation.z = newRotZ local rotationZ = -projectileData.rotation.z if creatorVehicle then -- if the projectile creator was a vehicle, then add 180 to invert the rotation. rotationZ = rotationZ + 180 end setElementRotation(element, projectileData.rotation.x, projectileData.rotation.y, rotationZ, "ZXY")
    1 point
  3. There's a problem with DirectX drivers recently to who do have an Nvidia or Intel GPU, AMD GPU's seems to be not affected yet, unfortunately, there's no "complete fix" for this issue to play on Fullscreen mode. There's two option you can try: 1. Switch to Fullscreen Windowed mode. 2. Stay with Fullscreen mode but avoid using "WN Key (Windows Key)", ALT-Tab or going to the desktop by anyway. (which I don't recommend)
    1 point
  4. 1 point
  5. Algo improvável está ocorrendo com conflito de outro resource, impossível, ele ao cair do servidor, salvar em 0,0,0. Porem, até não descobrir o problema, daria de fazer uma correção temporária, caso verificasse em x,y,z em 0, teleporta-lo para o hospital Este isElement(source) é realmente necessário? o jogador sempre será verdadeiro ao da quit do servidor, mas, testei em um servidor teste, e funciona, mesmo caindo do servidor. ou seja, possa ser um conflito, e muito artificial, teria que saber como realmente isso ocorre
    1 point
  6. مود رائع ,, وسعره مناسب لانه متعوب عليه .. كفو >
    1 point
×
×
  • Create New...