Jump to content

Lalalu

Members
  • Posts

    202
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Lalalu

  1. Vale, gracias, y para hacer que este baje? debería modificar esto para hacer que baje, no? local newZ = origZ + 20 dsadklajdd listo ya lo conseguí, muchas graciasss
  2. @Calculador, aquí muestro en el vídeo, como puedes notar el árbol se creo en una posición hacía arriba, pero se fue deslizando, en vez de sólo moverse hacía arriba en la posición donde se creo
  3. a ver, tendré que grabar para enseñarte el elemento l_74_0, es ese mismo sdhasjk es que ahorita no puedo grabar, pero a ver osea, supongamos que creo el objeto local objeto = createObject(2003,x+10,y+10,z,0) modificando los valores de x, y para que el objeto este alejado de mí moveObject ( objeto, 6000, x,y,z+20) y despues sube, este cuando sube en vez de subir en donde se creo, osea si sube donde se creo pero se va moviendo hacia un lado, cómo si se deslizara de la posición donde se creo
  4. Está bien, esta es la pequeña parte donde el objeto se crea y se mueve: local x, y, z = getElementPosition(l_74_0) local objeto = createObject(2003,x,y,z,0) moveObject ( objeto, 6000, x,y,z+20) osea funciona normal, el objeto se mueve como debería (hacía arriba), el único detalle es que cuando va subiendo este se desliza hacía un lado
  5. Eso hago, se supone que la altura es la Z, pero a medida de que el objeto va subiendo o bajando tiene movimiendo hacia un lado, es decir va subiendo y se va moviendo, se desliza hacía un lado
  6. Holaaa, el motivo de este post es el siguiente: Lo que ocurre es que cuando hago que un objeto tenga movimiento bien sea hacía arriba o hacía abajo este sube (con moveObject claro), pero no sube o baja en esa sola posición sino que tiene un movimiento hacía un lado, en vez de moverse sólo en esa posición donse se creo el objeto, ¿como podría arreglar esto?, espero sus respuestas, por favor
  7. Lalalu

    Mover marker

    Oh ya veo, y cómo podría attachear ese marker al objeto?, es decir, que función utilizaría para eso?
  8. Lalalu

    Mover marker

    Holaaaaa, hago este post con el siguiente motivo: Bueno, pues quisiera hacer que un marker se mueva como lo hace un objeto con moveObject, de hecho traté con moveObject pero después recordé que un marker no es un objeto, ¿me podrían decir que función debería usar para lograr que el marker se mueva de la forma que quiero, tipo como usar moveObject? dumobjeck = moveObject (objekt,1500,x+25,y+25,z)
  9. Hooola que tals, hago este post porque tengo un pequeño problema con un script ¿cómo podría hacer para que un objeto que está pegado al cuerpo gire o rote constántemente? local objeto = createObject(1598, x, y, z, 0, 0, 0) exports.bone_attach:attachElementToBone(objeto, l_74_0, 12, 0, 0.04 , 0.1) traté con esto, pero no funciono : moveObject ( objeto, 2000, x+5, y+5, z, 0, 0,500 )
  10. no sé acerca de eso, pero sí, tengo mapas de más de 20 mb
  11. Hello guys, i'm doing this post today because i need help with something .. i extracted this code from a superpowers script, i think that's all the code, i want to separate this code from all the script and that can be used with command, or always active, but i don't know what to delete to achieve that, could you guide me?this script basically consist in a superjump, if the key is pressed the player jumps very high until the button is released superjumping = 0 function rocketjump() startrocketjumpingthing = nil if getControlState("jump") == true then local task = getPedSimplestTask(getLocalPlayer()) if task == "TASK_SIMPLE_IN_AIR" and superjumping == 0 then if isTimer(startgroundchecktimer) then resetTimer ( startgroundchecktimer) else startgroundchecktimer = setTimer ( startjumpgroundcheck, 300, 1) end superjumpgroundcheck = 0 addEventHandler("onClientRender",getRootElement(), rocketplayer ) addEventHandler("onClientRender",getRootElement(), jumpgroundcheck ) triggerServerEvent ("onSpeedChange", getLocalPlayer(), "jumping") jumpstart = getTickCount() superjumping = 1 end end end function triggersuperjump(key, keyState) if getElementData( getLocalPlayer(), "transport_power" ) == "superjump" then if keyState == "down" then local px,py,pz = getElementPosition( getLocalPlayer () ) local isclear = isLineOfSightClear ( px, py, pz,px, py, pz-3,true,true, true, true,true,true, false, getLocalPlayer() ) if isTimer(startrocketjumpingthing) == false and isclear == false then startrocketjumpingthing = setTimer ( rocketjump, 650, 1) end elseif keyState == "up" then removeEventHandler("onClientRender",getRootElement(), rocketplayer ) end end end bindKey("jump", "both", triggersuperjump) function rocketplayer() local px,py,pz = getElementPosition( getLocalPlayer () ) local currenttask = getPedSimplestTask(getLocalPlayer()) if getTickCount() - jumpstart < 4500 and currenttask ~= "TASK_SIMPLE_NAMED_ANIM" then if getTickCount() - jumpstart > 3000 then theZ = 0 elseif getTickCount() - jumpstart > 2000 then theZ = .1 else theZ = .3 end local playerangle = getPedRotation(getLocalPlayer()) local newradRot = math.rad ( playerangle ) local radius = 3 local ex = px + radius * math.sin(newradRot) local ey = py + -(radius) * math.cos(newradRot) local ez = pz x,y,z = px-ex,py-ey,pz-ez local dist = math.sqrt(x*x+y*y+z*z) x = x*.4/dist y = y*.4/dist setElementVelocity(getLocalPlayer(),x, y, theZ) else removeEventHandler("onClientRender",getRootElement(), rocketplayer ) end end function jumpgroundcheck() if superjumpgroundcheck == 1 then local px,py,pz = getElementPosition( getLocalPlayer () ) local isclear = isLineOfSightClear ( px, py, pz,px, py, pz-2.5,true,true, true, true,true,true, false, getLocalPlayer() ) local currenttask = getPedSimplestTask(getLocalPlayer()) if isclear == false or currenttask == "TASK_SIMPLE_LAND" or isElementInWater(getLocalPlayer()) == true then removeEventHandler("onClientRender",getRootElement(), jumpgroundcheck ) setElementPosition(getLocalPlayer(),px,py,pz ) removeEventHandler("onClientRender",getRootElement(), rocketplayer ) superjumping = 0 triggerServerEvent ("onJumpChange", getLocalPlayer(), "normal") end end end function startjumpgroundcheck() superjumpgroundcheck = 1 startgroundchecktimer = nil triggerServerEvent ("onJumpChange", getLocalPlayer(), "jumping") end
  12. gracias a ambos, en caso de pasar el .map a .lua debo específicarlo como server o como client?
  13. Hola, qué tal, hago este post porque tengo unas cuántas dudas acerca del tema de proteger scripts para evitar robos, cómo podrían protegerse los mapas, autos, armas, skins sobretodo, de los robos?, así como también scripts normales, cómo podría protegerse el client de estos?
  14. Yes, you have reason, and yeah it's already working with your line, 1000thank you, but i think..., i mean, i want to edit some more because i want to understand a little bit more about dxDrawImage3d
  15. Muchas gracias, seguiré probando n.n
  16. Trate de usar el ejemplo de la wiki , pero no logré nada, sólo hice un desastre local activado = { } local players = getElementsByType( 'player' ) local img = dxCreateTexture("test.png") local x, y, z = getElementPosition(player) addEventHandler("onClientRender", root, function() -- x,y,z, targetx,targety,targetz,texture,width,color dxDrawMaterialLine3D( x+1, y+1, z+1, x, y+v, z , img, v, TextColor, x, y, z) end) function removeEffect( player ) if activado[ player ] == true then activado[ player ] = nil end end addEvent( "naruto:activarEfecto", true ) addEventHandler( "naruto:activarEfecto", getRootElement( ), function( player ) if not activado[ player ] or activado[ player ] == nil then activado[ player ] = true setTimer( removeEffect, 5000, 1, player ) end end ) no sé que hice ahí, pero seguiré intentando
  17. Gracias, debería usar el ejemplo de la wiki para empezar?
  18. sorry? jesus. I didn't say it in a bad way, i said that it did not work simply and nothing else, i did not give him instructions, nor did I tell him what to do, and in fact he helped me a lot, i understood certain things, he offered to help me, i never told him to do all the work, I'm not a "scripter" or anything like that, but that doesn't mean that i'm a jerk and i let them do all the work, so.. thanks.
  19. addEventHandler( "onClientRender", root, function( ) for i=1, #players do local p = players[i] if activado[ p ] == true then local x, y, z = getElementPosition( p ) local z_ground = getGroundPosition( x, y, z ) getPedBonePosition ( player,3 ) dxDrawImage3D( x, y, z_ground, 1, 2.5, imagen, tocolor( 0, 255, 230, 255 ), 0, x, y, z ) end end end ) something like this?
×
×
  • Create New...