Jump to content

cuervox123

Members
  • Posts

    67
  • Joined

  • Last visited

Details

  • Gang
    Taylor Gang

Recent Profile Visitors

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

cuervox123's Achievements

Snitch

Snitch (10/54)

0

Reputation

  1. hola tengo un script de un shader en un colshape,el problema es que solo quiero q se active a cada usuario que entra,pero a la hora de un usuario salir de el colshape,este desactiva el shader de los demas que estan dentro,aqui el codigo. S: function presion(source) if getElementData (source, "eszaraki",true) then if getElementType ( source ) == "player" then if isElement (presiondez) then destroyElement ( presiondez ) end local x, y, z = getElementPosition(source) presiondez = createColSphere(x, y, z, 80) --attachElements ( presiondez, source, 0.1, 0, 0, 270, 0, 00 ) addEventHandler ( "onColShapeHit", presiondez, testr ) addEventHandler ( "onColShapeLeave", presiondez, sefuelmk ) end end end addCommandHandler ( "presionz", presion ) function testr ( p ) -- if getElementType ( source ) == "player" then setElementData(source, "estadentrodez", "on")--if the element that entered was player triggerClientEvent ("elshader", p) triggerClientEvent ("memarie", p) outputChatBox ( " Estas Cerca de Zaraki!", p, 255, 255, 109 ) end function sefuelmk(p) setElementData(p, "estadentrodez", "off") triggerClientEvent ("saliodez", p) triggerClientEvent ("nomemarie", p) end C: function estacerca() if not getElementData (thePlayer, "eszaraki",true) then if getElementData(localPlayer, "estadentrodez") == "on" then toonShader, toonTec = dxCreateShader("toonShader.fx") end end end addEvent("elshader", true) addEventHandler("elshader", root, estacerca) local resourceRoot = getResourceRootElement(getThisResource()) local screenWidth, screenHeight = guiGetScreenSize() local bitDepth = 16 -- between 1 and 64 local outlineStrength = 0.9 -- between 0 and 1 // higher amount will decrease outline strenght local myScreenSource = dxCreateScreenSource(screenWidth, screenHeight) function mareo() if getElementData(localPlayer, "estadentrodez") == "on" then setCameraShakeLevel( 255 ) end end addEvent("memarie", true) addEventHandler("memarie", root, mareo) function nomareo() if getElementData(localPlayer, "estadentrodez") == "off" then setCameraShakeLevel( 0 ) end end addEvent("nomemarie", true) addEventHandler("nomemarie", root, nomareo) function testa() if (toonShader) then dxUpdateScreenSource(myScreenSource) dxSetShaderValue(toonShader, "ScreenSource", myScreenSource) dxSetShaderValue(toonShader, "ScreenWidth", screenWidth) dxSetShaderValue(toonShader, "ScreenHeight", screenHeight) dxSetShaderValue(toonShader, "BitDepth", bitDepth) dxSetShaderValue(toonShader, "OutlineStrength", outlineStrength) dxDrawImage(0, 0, screenWidth, screenHeight, toonShader) end end addEventHandler("onClientPreRender", root, testa) function estalejos(thePlayer) if (toonShader) then destroyElement(toonShader) toonShader = nil setCameraShakeLevel( 0 ) end end addEvent("saliodez", true) addEventHandler("saliodez", root, estalejos) si hay un jugador dentro con el efecto del shader,si entra otro jugador se le pone el efecto,pero si alguno de los 2 sale entonces el efecto se le cancela también al otro.
  2. cuervox123

    ayuda

    removido
  3. hola estoy creando un comando con dxDrawMaterialLine3D el problema es que lo necesito por comando,y al hacerlo así la imagen que uso,se desaparece de inmediato y lo que necesito es que se quede por un tiempo,alguna solucion? local img = dxCreateTexture("test.png") function portarr() -- x,y,z, targetx,targety,targetz,texture,width,color x, y, z = getElementPosition (localPlayer) dxDrawMaterialLine3D (x, y, z, x+5, y+5, z+5,img, 7, tocolor(255,255,255,255)) end addCommandHandler ( "portal", portarr )
  4. mmm me gustaria algo un poco mas cencillo sasu,pero si no hay otra forma tratare con un bind.
  5. pensé en eso aunque no lo probe por que creo que no funcionara,y es que lo q quiero hacer es crear una explosión al jugador hacer el click q requiere la katana para generar el daño.
  6. cuervox123

    Pregunta

    Buenas podrian facilitarme alguna función o algun codigo si es que existe que me indique cuando el jugador usa la katana es decir cuando el jugador hace click para hacer daño con ella. -Gracias.
  7. cuervox123

    ayuda

    hasta ahora vi,pues asi lo tenia el problema es que ya no es visible para los demas jugadores.ademas no ocurre la explosion.
  8. cuervox123

    ayuda

    no esta generando la explosion y los jugadores no pueden ver la accion,trate de ponerle esto al archivo .server addCommandHandler("t", function (p) for Key, Value in ipairs(getElementsByType("player")) do triggerClientEvent(Value, "tos", Value, p) end end ) funciona bien asi pero el problema es que genera lag y quisiera saber otra forma de hacerlo.
  9. cuervox123

    ayuda

    hola estoy creando un script para un personaje de anime,es sencillo al usar un comando el saltara y al usar otro en el aire el creara una espada que caerá el problema es que quiero hacer que al caer la espada esta genere una explosión pero que los demás jugadores lo vean.aqui el codigo gracias de antemano. S: addCommandHandler("t", function (p) triggerClientEvent(p, "tos", p, p) end ) function kbom(x,y,z) createExplosion ( x, y, z, 2 ) end addEvent("booom", true) addEventHandler("booom", root, kbom) C: function tos(p) for t,thePlayer in ipairs(getElementsByType("player")) do vx, vy, vz = getElementVelocity(thePlayer) x, y, z = getElementPosition (thePlayer) ground = getGroundPosition ( x, y, z ) + 2 dist = (z - ground) time = ( ( 2*dist ) / 9.8 ) * 100 elobj = createObject ( 339, x, y, z+80, 0, 0, 0 ) moveObject ( elobj, time, x, y, ground, 0, 0, 0 ) setElementVelocity(elobj,vx,vy,vz) local x, y, z = getElementPosition ( elobj ) setTimer (function () triggerServerEvent("booom", thePlayer, x, y, z) end, 1000, 1) end end addEvent("tos", true) addEventHandler("tos", root, tos) function saltar() setElementVelocity(localPlayer, 0, 0, 25) end addCommandHandler ( "tou", saltar )
  10. hola comenzare a hacer un script parecido a una bomba que cae pero con object no createProjectile quisiera saber como podria hacer que el object caiga al suelo,al este crearse en el aire,un saludo.
  11. solucionado muchas gracias a todos.
  12. cuervox123

    pregunta

    De casualidad alguien sabe si el scale de un arma se puede setear? pero un arma como la kata o el bat etc.
  13. ya lo hice pero sigue igual.
×
×
  • Create New...