#Doctor Posted May 9, 2020 Share Posted May 9, 2020 السلام عليكم شباب حبيت اضيف أغنيه في ماب لاكن الماب في عالم 30 لما اشغل الماب الأغنيه تشتغل في عالم0 احتاج مساعده و شكرا function onResourceStart() local sound = playSound3D("song.mp3", 3445.1999511719, 436.89999389648, 3.0999999046326, true) end addEventHandler("onClientResourceStart", resourceRoot, onResourceStart) Link to comment
#\_oskar_/# Posted May 9, 2020 Share Posted May 9, 2020 setElementDimension (sound, 30 ) Link to comment
#Doctor Posted May 9, 2020 Author Share Posted May 9, 2020 10 hours ago, #\_oskar_/# said: setElementDimension (sound, 30 ) مشكورر Link to comment
#Doctor Posted May 9, 2020 Author Share Posted May 9, 2020 12 hours ago, #\_oskar_/# said: setElementDimension (sound, 30 ) سويت كذا ما نجحت function startMySound() sound = playSound( "sound.mp3", true ) setElementDimension (sound, 30 ) end addEventHandler( "onClientResourceStart", resourceRoot, startMySound ) function stopMySound() stopSound( sound ) end addCommandHandler ( "sound", stopMySound ) --using the command 'stopsound' will stop the sound Link to comment
Spyrax Posted May 9, 2020 Share Posted May 9, 2020 function onResourceStart() local sound = playSound3D("song.mp3", 3445.1999511719, 436.89999389648, 3.0999999046326, true) setElementDimension(sound,30) end addEventHandler("onClientResourceStart", resourceRoot, onResourceStart) --wiki : Remember to use setElementDimension after creating the sound to play it outside of dimension 0. ^ كودك الي فوق اظن انه يشتغل لـ عالم رقم 0 بس . Link to comment
#Doctor Posted May 9, 2020 Author Share Posted May 9, 2020 11 minutes ago, RRex said: function onResourceStart() local sound = playSound3D("song.mp3", 3445.1999511719, 436.89999389648, 3.0999999046326, true) setElementDimension(sound,30) end addEventHandler("onClientResourceStart", resourceRoot, onResourceStart) --wiki : Remember to use setElementDimension after creating the sound to play it outside of dimension 0. ^ كودك الي فوق اظن انه يشتغل لـ عالم رقم 0 بس . يب بس كيف اخلي يستمع من بعيد شوي لأن دا يستمع من قريب فقط Link to comment
Spyrax Posted May 9, 2020 Share Posted May 9, 2020 (edited) 4 minutes ago, #Doctor said: يب بس كيف اخلي يستمع من بعيد شوي لأن دا يستمع من قريب فقط function onResourceStart() local sound = playSound3D("song.mp3", 3445.1999511719, 436.89999389648, 3.0999999046326, true) setElementDimension(sound,30) setSoundMaxDistance(sound, 20) end addEventHandler("onClientResourceStart", resourceRoot, onResourceStart) Edited May 9, 2020 by RRex Link to comment
#Doctor Posted May 9, 2020 Author Share Posted May 9, 2020 22 minutes ago, RRex said: function onResourceStart() local sound = playSound3D("song.mp3", 3445.1999511719, 436.89999389648, 3.0999999046326, true) setElementDimension(sound,30) setSoundMaxDistance(sound, 20) end addEventHandler("onClientResourceStart", resourceRoot, onResourceStart) مشكوور حبيبي ما قصرت شغاله ميه ميه اقدر اضيفلها امر لي يبي يوقف الأغنيه من الف8 ؟؟ Link to comment
Spyrax Posted May 9, 2020 Share Posted May 9, 2020 (edited) 14 minutes ago, #Doctor said: مشكوور حبيبي ما قصرت شغاله ميه ميه اقدر اضيفلها امر لي يبي يوقف الأغنيه من الف8 ؟؟ function onResourceStart() sound = playSound3D("song.mp3", 3445.1999511719, 436.89999389648, 3.0999999046326, true) setElementDimension(sound,30) setSoundMaxDistance(sound, 20) end addEventHandler("onClientResourceStart", resourceRoot, onResourceStart) -- By oskar addCommandHandler("stop", function () if isElement(sound) then destroyElement(sound) end end) Edited May 9, 2020 by RRex إضافة كود أوسكار . Link to comment
#\_oskar_/# Posted May 9, 2020 Share Posted May 9, 2020 addCommandHandler("stop", function () if isElement(sound) then destroyElement(sound) end end) شيل اللوكال حق الصوت 1 minute ago, RRex said: local sound = playSound3D("song.mp3", 3445.1999511719, 436.89999389648, 3.0999999046326, true) Link to comment
Spyrax Posted May 9, 2020 Share Posted May 9, 2020 4 minutes ago, #\_oskar_/# said: addCommandHandler("stop", function () if isElement(sound) then destroyElement(sound) end end) شيل اللوكال حق الصوت done . 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