Maksoud Posted May 28, 2016 Share Posted May 28, 2016 السلام عليكم و رحمة الله و بركاته سويت مود اول ما المود يشتغل يشغل اغانى بس بدى الاغنية الاولى تخلص تشتغل الثانية اكوادى : addEventHandler( "onClientResourceStart", getRootElement( ), function ( startedRes ) local sound = playSound("za.mp3") setSoundVolume(sound, 1) end ); يا ريت الرد السريع لو سمحتم Link to comment
Me[Z]oO Posted May 28, 2016 Share Posted May 28, 2016 addEventHandler "onClientSoundStopped" Link to comment
Maksoud Posted May 28, 2016 Author Share Posted May 28, 2016 شكرا بس فى اكثر من اغنية يشتغلوا بعد الاولى و لما بتخلص بيشتغل باقى الاغانى كلها مع بعض ! addEventHandler( "onClientResourceStart", getRootElement( ), function ( startedRes ) local sound = playSound("sounds/zahr.mp3") setSoundVolume(sound, 1) end ); addEventHandler( "onClientSoundStopped", getRootElement( ), function ( startedRes2 ) local sound2 = playSound("sounds/Indila.mp3") setSoundVolume(sound2, 1) end ); addEventHandler( "onClientSoundStopped", getRootElement( ), function ( startedRes3 ) local sound3 = playSound("sounds/za.mp3") setSoundVolume(sound3, 1) end ); Link to comment
#Soking Posted May 28, 2016 Share Posted May 28, 2016 addEventHandler( "onClientResourceStart", getRootElement( ), function ( startedRes ) local sound = playSound("sounds/zahr.mp3") setSoundVolume(sound, 1) addEventHandler( "onClientSoundStopped", sound, function ( startedRes2 ) local sound2 = playSound("sounds/Indila.mp3") setSoundVolume(sound2, 1) end ) addEventHandler( "onClientSoundStopped", sound2, function ( startedRes3 ) local sound3 = playSound("sounds/za.mp3") setSoundVolume(sound3, 1) end ) end ) Note : غير مجرب , ومب متاكد Link to comment
nxFairlywell Posted May 28, 2016 Share Posted May 28, 2016 local sounds={ "sounds/zahr1.mp3", "sounds/zahr2.mp3", "sounds/zahr3.mp3", } local num = 1 addEventHandler("onClientResourceStart", resourceRoot, function () sound=playSound( sounds[num], false ) setSoundVolume( sound, 1 ) end ) addEventHandler("onClientSoundStopped", sound, function( rsn ) if rsn == "finished" then destroyElement( sound ) if num == #sounds then num=1 playSound( sounds[num], false ) return end if num ~= #sounds then num=num+1 playSound( sounds[num], false ) return end end end ) Link to comment
Maksoud Posted May 28, 2016 Author Share Posted May 28, 2016 local sounds={ "sounds/zahr1.mp3", "sounds/zahr2.mp3", "sounds/zahr3.mp3", } local num = 1 addEventHandler("onClientResourceStart", resourceRoot, function () sound=playSound( sounds[num], false ) setSoundVolume( sound, 1 ) end ) addEventHandler("onClientSoundStopped", sound, function( rsn ) if rsn == "finished" then destroyElement( sound ) if num == #sounds then num=1 playSound( sounds[num], false ) return end if num ~= #sounds then num=num+1 playSound( sounds[num], false ) return end end end ) ما نجح Link to comment
Maksoud Posted May 28, 2016 Author Share Posted May 28, 2016 addEventHandler( "onClientResourceStart", getRootElement( ), function ( startedRes ) local sound = playSound("sounds/zahr.mp3") setSoundVolume(sound, 1) addEventHandler( "onClientSoundStopped", sound, function ( startedRes2 ) local sound2 = playSound("sounds/Indila.mp3") setSoundVolume(sound2, 1) end ) addEventHandler( "onClientSoundStopped", sound2, function ( startedRes3 ) local sound3 = playSound("sounds/za.mp3") setSoundVolume(sound3, 1) end ) end ) Note : غير مجرب , ومب متاكد نجح بس اخر اغنية ما تشتغل Link to comment
#Soking Posted May 28, 2016 Share Posted May 28, 2016 addEventHandler( "onClientResourceStart", getRootElement( ), function ( startedRes ) local sound = playSound("sounds/zahr.mp3") setSoundVolume(sound, 1) addEventHandler( "onClientSoundStopped", sound, function ( startedRes2 ) local sound2 = playSound("sounds/Indila.mp3") setSoundVolume(sound2, 1) addEventHandler( "onClientSoundStopped", sound2, function ( startedRes3 ) local sound3 = playSound("sounds/za.mp3") setSoundVolume(sound3, 1) end ) end ) end ) Link to comment
Maksoud Posted May 28, 2016 Author Share Posted May 28, 2016 لما اسوى رسترت لمود اخر ال اغانى تكون متكررة Link to comment
Froze Posted May 28, 2016 Share Posted May 28, 2016 getRootElement( ) غيرresourceRoot إلى Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now