Soren Posted January 21, 2012 Posted January 21, 2012 Hola a todos quiero hacer un script que reprodusca una cancion en un server play y cuando se acabe se reprodusca otra Alguien sabe como esto es lo que tengo function playerConect (playerNick, playerIP, playerUsername, playerSerial, playerVersionNumber) if (not isElement(sound)) then local sound = playSound("songs/song1.mp3") addEventHandler("onPlayerJoin", getRootElement(), playerConect) Pero no se hacer que se reprudsca el sig. sonidos sin que se reprodusca al mismo tiempo que el otro
Castillo Posted January 21, 2012 Posted January 21, 2012 addEventHandler("onClientResourceStart",resourceRoot, function () if (not isElement(sound)) then sound = playSound("songs/song1.mp3") end end) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
12p Posted January 21, 2012 Posted January 21, 2012 (edited) No comprendo porqué usan tanto parentesis if ( ok ) then end , esto no es C++ Edited January 21, 2012 by Guest
Castillo Posted January 21, 2012 Posted January 21, 2012 Benxamix: El vento "onClientPlayerJoin" solo se ejecuta para todos menos el CLIENTE. Usa "onClientResourceStart" que es cuando el recurso se termina de descargar. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Soren Posted January 21, 2012 Author Posted January 21, 2012 No habia preguntado eso Lo que quiero es que despues de que se acabe un sonidos se reprodusca el sig.
Castillo Posted January 21, 2012 Posted January 21, 2012 Si son archivos, no live-streams, entonces podrias usar getSoundLength y verificar cuando se acabe el sonido. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Soren Posted January 22, 2012 Author Posted January 22, 2012 Si son archivos, no live-streams, entonces podrias usar getSoundLength y verificar cuando se acabe el sonido. Busque en la wiki ese comando pero no lo encontre como se usa?
Castillo Posted January 22, 2012 Posted January 22, 2012 No te entiendo, no es ningun comando. Esta función se utiliza para devolver la duración de la reproducción del elemento de sonido especificado. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Soren Posted January 22, 2012 Author Posted January 22, 2012 No te entiendo, no es ningun comando.Esta función se utiliza para devolver la duración de la reproducción del elemento de sonido especificado. mi error pero en la wiki no da ejemplos asi que no se como guiarme
Recommended Posts