maauroo Posted March 22, 2012 Share Posted March 22, 2012 Hola Quisiera Saber Como Hacer Un Conteo Con Cmd, Numeros Con Imagen Y Sonidos ? Link to comment
Castillo Posted March 22, 2012 Share Posted March 22, 2012 addCommandHandler setTimer guiCreateStaticImage playSound/playSound3D Link to comment
iFoReX Posted March 22, 2012 Share Posted March 22, 2012 que esta mal ? function delayedChat () outputChatBox ( "1" ) end setTimer ( delayedChat, 1000, 1 ) function delayedChat1 () outputChatBox ( "2" ) end setTimer ( delayedChat1, 3000, 1 ) function delayedChat2 () outputChatBox ( "3" ) end setTimer ( delayedChat2, 4000, 1 ) function delayedChat3 () outputChatBox ( "Go Go Go" ) end setTimer ( delayedChat3, 6000, 1 ) addCommandHandler("cuenta", delayedChat, delayedChat1, delayedChat2, delayedChat3 ) Link to comment
Castillo Posted March 23, 2012 Share Posted March 23, 2012 Casi todo. function delayedChat () outputChatBox ( "1" ) setTimer ( delayedChat1, 1000, 1 ) end addCommandHandler("cuenta", delayedChat ) function delayedChat1 () outputChatBox ( "2" ) setTimer ( delayedChat2, 2000, 1 ) end function delayedChat2 () outputChatBox ( "3" ) setTimer ( delayedChat3, 3000, 1 ) end function delayedChat3 () outputChatBox ( "Go Go Go" ) end Link to comment
iFoReX Posted March 23, 2012 Share Posted March 23, 2012 Como les podria poner Colores ? Link to comment
Castillo Posted March 23, 2012 Share Posted March 23, 2012 Mira los argumentos de outputChatBox. Link to comment
maauroo Posted March 23, 2012 Author Share Posted March 23, 2012 Mira Lo Hise Guiandome Con Un Resource Y El Unico Problema Es Que Cuando Inicia El Conteo Nadie Ve La Imagen y Nadie Escucha Los Sonidos Del Conteo.. function Conteo ( source ) guiSetVisible ( imagen, false ) sound3 = playSound( "Sonidos/3.mp3", false ) imagen = guiCreateStaticImage(305,119,110,190,"imagen/3.png",false) setTimer ( Conteo2, 1000, 1 ) outputChatBox ( "Conteo Iniciado.", getRootElement(), 255, 255, 255, true end Cual Es El Error? Link to comment
Castillo Posted March 23, 2012 Share Posted March 23, 2012 function Conteo ( ) if ( isElement ( image ) ) then destroyElement ( image ) end if ( isElement ( sound3 ) ) then destroyElement ( sound3 ) end sound3 = playSound( "Sonidos/3.mp3", false ) imagen = guiCreateStaticImage(305,119,110,190,"imagen/3.png",false) setTimer ( Conteo2, 1000, 1 ) outputChatBox ( "Conteo Iniciado.", 255, 255, 255, true ) -- Te falto un parentesis. end Link to comment
maauroo Posted March 23, 2012 Author Share Posted March 23, 2012 Lo Probe Y Nadie Lo Ve.. function Conteo ( ) if ( isElement ( imagen ) ) then destroyElement ( imagen ) end if ( isElement ( sound3 ) ) then destroyElement ( sound3 ) end sound3 = playSound( "Sonidos/3.mp3", false ) imagen = guiCreateStaticImage(305,119,110,190,"images/3.png",false) setTimer ( Conteo2, 1000, 1 ) outputChatBox ( "Conteo Iniciado.", 255, 255, 255, true ) -- Te falto un parentesis. end function Conteo2 ( ) if ( isElement ( imagen ) ) then destroyElement ( imagen ) end if ( isElement ( sound3 ) ) then destroyElement ( sound3 ) end sound3 = playSound( "Sonidos/2.mp3", false ) imagen = guiCreateStaticImage(305,119,110,190,"images/2.png",false) setTimer ( Conteo1, 1000, 1 ) end function Conteo1 ( ) if ( isElement ( imagen ) ) then destroyElement ( imagen ) end if ( isElement ( sound3 ) ) then destroyElement ( sound3 ) end sound3 = playSound( "Sonidos/1.mp3", false ) imagen = guiCreateStaticImage(305,119,110,190,"images/1.png",false) setTimer ( Conteo0, 1000, 1 ) end function Conteo0 ( ) if ( isElement ( imagen ) ) then destroyElement ( imagen ) end if ( isElement ( sound3 ) ) then destroyElement ( sound3 ) end sound3 = playSound( "Sonidos/0.mp3", false ) imagen = guiCreateStaticImage(305,119,110,190,"images/go.png",false) setTimer ( ConteoEnd, 1000, 1 ) end function ConteoEnd ( ) if ( isElement ( imagen ) ) then destroyElement ( imagen ) end end addCommandHandler ( "conteo", Conteo ) Donde Esta El Problema? Link to comment
diegofkda Posted March 23, 2012 Share Posted March 23, 2012 Server-side: addCommandHandler ( "conteo", function (source) triggerServerEvent ( root, "conteo", source ) end ) Client-side: function Conteo ( ) if ( isElement ( imagen ) ) then destroyElement ( imagen ) end if ( isElement ( sound3 ) ) then destroyElement ( sound3 ) end sound3 = playSound( "Sonidos/3.mp3", false ) imagen = guiCreateStaticImage(305,119,110,190,"images/3.png",false) setTimer ( Conteo2, 1000, 1 ) outputChatBox ( "Conteo Iniciado.", 255, 255, 255, true ) -- Te falto un parentesis. end addEvent ( "conteo", true ) addEventHandler ( "conteo", root, Conteo ) function Conteo2 ( ) if ( isElement ( imagen ) ) then destroyElement ( imagen ) end if ( isElement ( sound3 ) ) then destroyElement ( sound3 ) end sound3 = playSound( "Sonidos/2.mp3", false ) imagen = guiCreateStaticImage(305,119,110,190,"images/2.png",false) setTimer ( Conteo1, 1000, 1 ) end function Conteo1 ( ) if ( isElement ( imagen ) ) then destroyElement ( imagen ) end if ( isElement ( sound3 ) ) then destroyElement ( sound3 ) end sound3 = playSound( "Sonidos/1.mp3", false ) imagen = guiCreateStaticImage(305,119,110,190,"images/1.png",false) setTimer ( Conteo0, 1000, 1 ) end function Conteo0 ( ) if ( isElement ( imagen ) ) then destroyElement ( imagen ) end if ( isElement ( sound3 ) ) then destroyElement ( sound3 ) end sound3 = playSound( "Sonidos/0.mp3", false ) imagen = guiCreateStaticImage(305,119,110,190,"images/go.png",false) setTimer ( ConteoEnd, 1000, 1 ) end function ConteoEnd ( ) if ( isElement ( imagen ) ) then destroyElement ( imagen ) end end addCommandHandler ( "conteo", Conteo ) Pones /conteo en el chat y empieza a contar. Link to comment
maauroo Posted March 25, 2012 Author Share Posted March 25, 2012 Ayuda!! Cuando Pongo /Conteo Nadie Lo Ve Ni Lo Escucha El Conteo.. Que Esta Pasando? Link to comment
Recommended Posts