Jump to content

#Raiden

Members
  • Posts

    79
  • Joined

  • Last visited

About #Raiden

  • Birthday 15/10/2002

Details

  • Gang
    Cielo
  • Location
    Venezuela

Recent Profile Visitors

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

#Raiden's Achievements

Transformer

Transformer (11/54)

0

Reputation

  1. #Raiden

    Ayudame, tu.

    CLIENT function abrir() window = guiCreateWindow ( 0, 0, 10, 10, "...", true ) guiSetVisible(ventana , true) showCursor(true) end addEvent( "onGreetingUI", true ) addEventHandler( "onGreetingUI", localPlayer, abrir) SERVER function greetingEvent(hitElement, thePlayer) local x,y,z = getElementPosition(thePlayer) marker = createMarker(x + 2, y + 2, z, "cylinder", 1.5, 255, 255, 255, 170) triggerClientEvent ( hitElement, "onGreetingUI", hitElement) end addEventHandler ("onMarkerHit", marker , greetingEvent) O sino intenta con esto: --Client marker2 = createMarker(X,Y,Z, "cylinder", 1.5, 255, 255, 255) function abrir2() window = guiCreateWindow ( 0, 0, 500, 500, "...", true ) showCursor(true) end addEventHandler("onClientMarkerHit", marker2, abrir2)
  2. Sigue apareciendo el mensaje en el piso de abajo aunque haya quitado el isElementWithinMarker, probé quitando onClientMarkerHit y probando de diferentes maneras, pero igual sigue apareciendo el mensaje en el segundo piso.
  3. Quiero hacer otra pregunta, quiero que este mensaje solo aparezca cuando este arriba del marker, yo intente con isElementWithinMarker pero aún así aparece en el piso de abajo, el teleport del comando /pass manda al piso de abajo del casino, y si paso por el lugar donde estaba ubicado el marker saldrá el mensaje : function asd2() if isElementWithinMarker(localPlayer,markerPass ) then exports.barmessage:outputBarMessage( "#ff0000Para entrar a este lugar tienes que escribir una contraseña, Buscala por todo el CASINO!", 255, 255, 255, 3500, true ) end end addEventHandler("onClientMarkerHit", markerPass, asd2) Ya intente quitando ''OnClientMarkerHit'' pero igual.
  4. Bueno, ya no importa, puse el 'setElementPosition' y isElementWithinMarker en la parte del comando /pass y me sirvió así, no se si a eso te referias Solid, pero si es así Gracias .
  5. Se supone que solo debería funcionar el comando cuando este en el marker, pero se puede usar en cualquier lugar, y no teletransporta al lugar que es. El código: --Este es el marker markerPass = createMarker(2147.90308, 1605.75427, 1005, "cylinder",1.5, 255,255,0) setElementInterior(markerPass, 1) -- password = "bossa2514789" function marker123( ) if isElementWithinMarker(localPlayer,markerPass ) then setElementPosition(localPlayer,2147.75269, 1601.10425, 1005.97955) end end addCommandHandler("password", marker123) function asd2() exports.barmessage:outputBarMessage( "#ff0000Para entrar a este lugar tienes que escribir una contraseña, Buscala por todo el CASINO!", 255, 255, 255, 3500, true ) end addEventHandler("onClientMarkerHit", markerPass, asd2) addCommandHandler("pass", function ( comand, arg1) if tostring(arg1) == tostring(password) then exports.barmessage:outputBarMessage( "#00ff00Contraseña correcta! al entrar a este lugar no podras volver al CASINO!", 255, 255, 255, 3500, true ) else exports.barmessage:outputBarMessage( "#ff000Contraseña Incorrecta! Sigue intentado", 255, 255, 255, 3500, true ) end end )
  6. Bueno, si funciona lo que me pasaste Venad, ya salen los mensajes que es cuando es incorrecto o correcto muchas gracias por eso , pero no me manda a la posición que es al escribir el comando, sino que solo sale ''Comando correcto'' pero no me da teleport al lugar que puse. markerPass = createMarker(2147.90308, 1605.75427, 1005, "cylinder",1.5, 255,255,0) setElementInterior(markerPass, 1) password = "bossa2514789" function marker123( ) if isElementWithinMarker(localPlayer,markerPass ) then setElementPosition(localPlayer,2147.75269, 1601.10425, 1005.97955) end end addCommandHandler(password, marker123) function asd2() exports.barmessage:outputBarMessage( "#ff0000Para entrar a este lugar tienes que escribir una contraseña, Buscala por todo el CASINO!", 255, 255, 255, 3500, true ) end addEventHandler("onClientMarkerHit", markerPass, asd2) addCommandHandler("pass", function ( comand, arg1) if tostring(arg1) == tostring(password) then exports.barmessage:outputBarMessage( "#00ff00Contraseña correcta! al entrar a este lugar no podras volver al CASINO!", 255, 255, 255, 3500, true ) else exports.barmessage:outputBarMessage( "#ff000Contraseña Incorrecta! Sigue intentado", 255, 255, 255, 3500, true ) end end )
  7. Me pone contraseña incorrecta con cualquier pass, no se si tenía que editar otras cosa del código que me pasaste o simplemente dejarlo así, pero ahora que lo pienso debí para todo el código. Este sería el código completo con los que me paso Venad: markerPass = createMarker(2147.90308, 1605.75427, 1005, "cylinder",1.5, 255,255,0) setElementInterior(markerPass, 1) password = "bossa2514789" function marker123( ) if isElementWithinMarker(localPlayer,markerPass ) then setElementPosition(localPlayer,2147.75269, 1601.10425, 1005.97955) end end addCommandHandler(password, marker123) function mensaje() exports.barmessage:outputBarMessage( "#ff0000Para entrar a este lugar tienes que escribir una contraseña, Buscala por todo el CASINO!", 255, 255, 255, 3500, true ) end addEventHandler("onClientMarkerHit", markerPass, mensaje) addCommandHandler("pass", function (source, comand, arg1) if tostring(arg1) == password then exports.barmessage:outputBarMessage( "#00ff00Contraseña correcta! al entrar a este lugar no podras volver al CASINO!", 255, 255, 255, 3500, true ) else exports.barmessage:outputBarMessage( "#ff000Contraseña Incorrecta! Sigue intentado", 255, 255, 255, 3500, true ) end end ) Este el que tenia. markerPass = createMarker(2147.90308, 1605.75427, 1005, "cylinder",1.5, 255,255,0) setElementInterior(markerPass, 1) function marker123( ) if isElementWithinMarker(localPlayer,markerPass ) then setElementPosition(localPlayer,2147.75269, 1601.10425, 1005.97955) end end addCommandHandler("bossa2514789", marker123) function mensaje() exports.barmessage:outputBarMessage( "#ff0000Para entrar a este lugar tienes que escribir una contraseña, Buscala por todo el CASINO!", 255, 255, 255, 3500, true ) end addEventHandler("onClientMarkerHit", markerPass, mensaje) Comando = "bossa2514789" function comandEntrar() if Comando then exports.barmessage:outputBarMessage( "#00ff00Contraseña correcta! al entrar a este lugar no podras volver al CASINO!", 255, 255, 255, 3500, true ) else exports.barmessage:outputBarMessage( "#ff000Contraseña Incorrecta! Sigue intentado", 255, 255, 255, 3500, true ) end end addCommandHandler(Comando, comandEntrar)
  8. Comando = "bossa2514789" function comandEntrar() if Comando then exports.barmessage:outputBarMessage( "#00ff00Contraseña correcta! al entrar a este lugar no podras volver al CASINO!", 255, 255, 255, 3500, true ) else exports.barmessage:outputBarMessage( "#ff000Contraseña Incorrecta! Sigue intentado", 255, 255, 255, 3500, true ) end end addCommandHandler(Comando, comandEntrar) Lo que quiero hacer es que, si el jugador pone un comando diferente al "bossa2514789" le salga el barmessage, diciendo ''Contraseña incorrecta'' y si pone el comando "bossa2514789'' Le salga el barmessage de ''Contraseña correcta''.
  9. Bueno, ya pude hacer que cambie de color la imagen cuando bloqueo/desbloquea, de igual forma gracias.
  10. Bueno, estaba haciendo un script para bloquear/desbloquear vehiculo bastance sencillo creo, pero quiero agregarle otra cosa y es que cada vez que bloqueen el auto la imagen del auto cambie de color a verde y cuando lo desbloqueen cambie a color blanco como estaba antes, tengo hecho esto pero no funciona, no sé si esta mal el client o el server. --CLIENT function drawSpeedometer() function bloq() dxDrawImage(1136, 704, 36, 33, "carState.png", 0, 0, 0, tocolor(17,254, 28, 255), false) playSoundFrontEnd(2) end addEvent("Bloq", true) addEventHandler("Bloq", root, bloq) function unbloq() dxDrawImage(1136, 704, 36, 33, "carState.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) playSoundFrontEnd(2) end addEvent("unbloq", true) addEventHandler("unbloq", root, unbloq) end addEventHandler("onClientRender", root, drawSpeedometer) -SERVER function bloquear(thePlayer) player = getPlayerOccupiedVehicle(thePlayer) if (player) then if (isVehicleLocked(player)) then setVehicleLocked(player, false) outputChatBox("#AFAFAF[VEHICULO] #FFFFFFDESBLOQUEADO", thePlayer, 255,255,255, true) triggerClientEvent( player, "unbloq", player) else setVehicleLocked(player, true) outputChatBox("#AFAFAF[VEHICULO] #FFFFFFBloqueado", thePlayer, 255,255,255, true) triggerClientEvent( player, "Bloq", player) end end end function salir(player,seat,jacked) if(isVehicleLocked(source)) then setVehicleLocked(source,false) end end addEventHandler("onVehicleExit",getRootElement(),salir) function bind() local pla = getElementsByType('player') for key,val in ipairs(pla) do bindKey( val, "L", "down", bloquear) end end addEventHandler ( "onResourceStart", getRootElement(), bind )
  11. Pues si, yo no veo muy bueno eso del RPG, solo es trabajar y aveses es aburrido ya que los trabajos siempre son lo mismo, aunque hay 3 trabajos que en ninguno de los servidores que he entrado los he visto.
  12. Todo anda bien, menos esa parte , le puedo dar click y todo, ¿No hay una forma de que al darle click al rectangulo salga una ventana, y si hay otros rectangulos que abran ventanas no se le puedan dar click hasta que cierre la ventana que abrí antes que las demás?
  13. Siempre los mismos trabajos no se les ocurre otros? además ese no es el gamemode NG?
  14. Hola, tengo un pequeño problema con los rectangle button, ya tengo para que se le pueda dar click al rectangle, pero mi problema es que al darle click al rectangle se abre otro rectangle tipo ventana, todo normal hasta ahí, el problema es que se le puede dar muchas veses a ese boton para que se abra la ventana aún así lo haya borrado con el ''removeEventHandler'' no sé si me explique bien, pero espero que me entiendan. Codigo: local rectangleData = { x = 400, y = 700, width = 100, height = 20 } local rectangleData2 = { x = 700, y = 300, width = 700, height = 700 } function dxdr3 ( ) dxDrawRectangle ( rectangleData2.x, rectangleData2.y, rectangleData2.width, rectangleData2.height, tocolor ( 0, 0, 0, 120 ) ) end addEventHandler ( "onClientRender", root, dxdr3) function dxdr ( ) dxDrawRectangle ( rectangleData.x, rectangleData.y, rectangleData.width, rectangleData.height, tocolor ( 0, 0, 0, 120 ) ) end addEventHandler ( "onClientRender", root, dxdr) addEventHandler ( "onClientClick", root, function ( _, _, x, y ) if ( x >= rectangleData.x and x <= rectangleData.x + rectangleData.width and y >= rectangleData.y and y <= rectangleData.y + rectangleData.height ) then removeEventHandler ( "onClientRender", root, dxdr) addEventHandler ( "onClientRender", root, dxdr3) elseif ( x >= rectangleData2.x and x <= rectangleData2.x + rectangleData2.width and y >= rectangleData2.y and y <= rectangleData2.y + rectangleData2.height ) then removeEventHandler ( "onClientRender", root, dxdr3) end end)
×
×
  • Create New...