Javier Posted December 11, 2012 Share Posted December 11, 2012 Hoa amigos, tengo un problema con un trigger. Miren client function musica ( music ) sound = playSound ( music ) setSoundVolume ( music, 0.5 ) end addEvent( "reproducir", true ) addEventHandler( "reproducir", getRootElement(), musica ) server local sounds = {"sounds/sirena.mp3"} function checkeo ( ) triggerClientEvent ( "reproducir", getRootElement(), sounds ) end addEventHandler( "onResourceStart", resourceRoot, checkeo ) No reproduce. Me tiene podrido . Gracias desde el principio Link to comment
Castillo Posted December 11, 2012 Share Posted December 11, 2012 local sounds = "sounds/sirena.mp3" function checkeo ( ) triggerClientEvent ( "reproducir", getRootElement(), sounds ) end addEventHandler( "onResourceStart", resourceRoot, checkeo ) Link to comment
Javier Posted December 12, 2012 Author Share Posted December 12, 2012 No funciona Solid! Link to comment
Castillo Posted December 12, 2012 Share Posted December 12, 2012 Eso es porque el cliente aun no se cargo. local sounds = "sounds/sirena.mp3" function musica ( ) sound = playSound ( sounds ) setSoundVolume ( sound, 0.5 ) end addEventHandler ( "onClientResourceStart", resourceRoot, musica ) Link to comment
Recommended Posts