JesusAliso Posted February 4, 2013 Share Posted February 4, 2013 Hola Amigos, Aquí tengo este script de Música para El Servidor Pero como ven "music2.mp3" solo se reproduce esa y termina y se vuelve a repetir, Quiero hacer que las otras se reproduzcan, termina una se reproduce la otra. ayuda por favor. Aqui les dejo el Script outputChatBox ("#FF1493[[NO#ffffffTA]]: #FF0000Bienvenido Al Servidor", 255, 0, 0, true) outputChatBox ("#FF1493[[NO#ffffffTA]]: #FF0000Presiona #FF0000'M'#FF0000Para Apagar o Encender la Musica.", 255, 0, 0, true) outputChatBox ("#FF1493[[NO#ffffffTA]]: #FF0000asda", 255, 0, 0, true) outputChatBox ("#FF1493[[NO#ffffffTA]]: #FF0000Diviertete y Recomienda El Server.", 255, 0, 0, true) function startMusic() setRadioChannel(0) song = playSound("music2.mp3",true) end function makeRadioStayOff() setRadioChannel(0) cancelEvent() end function toggleSong() if not songOff then setSoundVolume(song,0) songOff = true removeEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) else setSoundVolume(song,1) songOff = false setRadioChannel(0) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) end end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),startMusic) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) addEventHandler("onClientPlayerVehicleEnter",getRootElement(),makeRadioStayOff) addCommandHandler("musicmusic",toggleSong) bindKey("m","down","musicmusic") addEventHandler("onClientResourceStop",getResourceRootElement(getThisResource()),startMusic) Meta "music2.mp3" /> "music3.mp3" /> "music4.mp3" /> "music5.mp3" /> Link to comment
Julian09123 Posted February 5, 2013 Share Posted February 5, 2013 Estas dejando este solo function startMusic() setRadioChannel(0) song = playSound("music2.mp3",true) Link to comment
JesusAliso Posted February 5, 2013 Author Share Posted February 5, 2013 Ya Lo Hice Pero se reproducen Todas a la Misma Vez :L Link to comment
Castillo Posted February 5, 2013 Share Posted February 5, 2013 Crea una tabla y pone la musica dentro, luego empeza la primera de la tabla y al terminar, anda a la siguiente, y asi seguis. Link to comment
JesusAliso Posted February 6, 2013 Author Share Posted February 6, 2013 Una Tabla?, que crees el script 1 por 1? o como no entiendo la tabla? cree* Link to comment
Castillo Posted February 6, 2013 Share Posted February 6, 2013 http://lua-users.org/wiki/TablesTutorial Link to comment
JesusAliso Posted February 6, 2013 Author Share Posted February 6, 2013 Ok estaré leyendo. gracias Link to comment
Recommended Posts