Mr.Mostafa Posted July 1, 2019 Share Posted July 1, 2019 سلام عليكم ابي اشغل صوت من السيرفر عن طريق رابط ويشغل الصوت ويكتبلي بالشات حجم الصوت كام يعني كام ثانية الصوت هادي تطلع الصوت 0 sound = playSound3D(link, -1233.9285888672, 456.3063659668, 6.4603748321533, true) length_s = getSoundLength(sound) outputChatBox(length_s,255,0,0,true) Link to comment
+Source|> Posted July 1, 2019 Share Posted July 1, 2019 On 01/07/2019 at 19:09, Mr.Mostafa said: سلام عليكم ابي اشغل صوت من السيرفر عن طريق رابط ويشغل الصوت ويكتبلي بالشات حجم الصوت كام يعني كام ثانية الصوت هادي تطلع الصوت 0 sound = playSound3D(link, -1233.9285888672, 456.3063659668, 6.4603748321533, true) length_s = getSoundLength(sound) outputChatBox(length_s,255,0,0,true) Expand link = ? 1 Link to comment
Mr.Mostafa Posted July 1, 2019 Author Share Posted July 1, 2019 يحذف او يغلق سويت تايمر بحيث يطلع ال lenth بعد 5 ثواني عشان يكون جاب الصوت من اللينك واشتغل @N3xT @!#NssoR_) Link to comment
N3xT Posted July 1, 2019 Share Posted July 1, 2019 احذف التايمر واستعمل الحدث التالي, التايمر خطأ ممكن بعد 5 ثواني الصوت باقي ما اشتغل onClientSoundStarted Link to comment
Mr.Mostafa Posted July 1, 2019 Author Share Posted July 1, 2019 On 01/07/2019 at 22:37, N3xT said: احذف التايمر واستعمل الحدث التالي, التايمر خطأ ممكن بعد 5 ثواني الصوت باقي ما اشتغل onClientSoundStarted Expand يب صح . تمام Link to comment
Mr.Mostafa Posted July 13, 2019 Author Share Posted July 13, 2019 On 01/07/2019 at 22:37, N3xT said: احذف التايمر واستعمل الحدث التالي, التايمر خطأ ممكن بعد 5 ثواني الصوت باقي ما اشتغل onClientSoundStarted Expand كيف اتحقق من اسم الصوت في هذا الحدث ؟ Link to comment
+Source|> Posted July 13, 2019 Share Posted July 13, 2019 On 13/07/2019 at 22:38, Mr.Mostafa said: كيف اتحقق من اسم الصوت في هذا الحدث ؟ Expand اعتقد كذا sound = playSound3D(link, -1233.9285888672, 456.3063659668, 6.4603748321533, true) addEventHandler("onClientSoundStarted", sound, function(rsn) if rsn == "play" then length_s = getSoundLength(sound) outputChatBox(length_s,255,0,0,true) end end ) ان شاء الله ما يكون هريسه Link to comment
nxFairlywell Posted July 14, 2019 Share Posted July 14, 2019 On 13/07/2019 at 23:37, +Source|> said: اعتقد كذا sound = playSound3D(link, -1233.9285888672, 456.3063659668, 6.4603748321533, true) addEventHandler("onClientSoundStarted", sound, function(rsn) if rsn == "play" then length_s = getSoundLength(sound) outputChatBox(length_s,255,0,0,true) end end ) ان شاء الله ما يكون هريسه Expand sound = playSound3D(link, -1233.9285888672, 456.3063659668, 6.4603748321533, true) addEventHandler("onClientSoundStarted", sound, function(rsn) if rsn == "play" and source == sound then length_s = getSoundLength(sound) outputChatBox(length_s,255,0,0,true) end end ) Link to comment
iMr.WiFi..! Posted July 14, 2019 Share Posted July 14, 2019 (edited) On 13/07/2019 at 23:37, +Source|> said: ان شاء الله ما يكون هريسه Expand أتمنى لو ما كان عندك كود واثق منه, ماتطرحه عشان مايطول الموضوع وتضيع وقت الأخ بدون فائدة. Edited July 14, 2019 by iMr.WiFi..! Link to comment
N3xT Posted July 14, 2019 Share Posted July 14, 2019 On 14/07/2019 at 00:53, NX_CI said: sound = playSound3D(link, -1233.9285888672, 456.3063659668, 6.4603748321533, true) addEventHandler("onClientSoundStarted", sound, function(rsn) if rsn == "play" and source == sound then length_s = getSoundLength(sound) outputChatBox(length_s,255,0,0,true) end end ) Expand تحققك ماله داعي, لأن الحدث على الصوت نفسه نهاية سطر 2 Link to comment
nxFairlywell Posted July 14, 2019 Share Posted July 14, 2019 On 14/07/2019 at 06:44, N3xT said: تحققك ماله داعي, لأن الحدث على الصوت نفسه نهاية سطر 2 Expand ما قريت سطر الإيفنت كامل =D Link to comment
+Source|> Posted July 14, 2019 Share Posted July 14, 2019 On 14/07/2019 at 03:12, iMr.WiFi..! said: أتمنى لو ما كان عندك كود واثق منه, ماتطرحه عشان مايطول الموضوع وتضيع وقت الأخ بدون فائدة. Expand انا قلت مجرد افتراض وانا ذكرت اني مب متأكد منه لو ما يبي يجرب براحته Link to comment
Mr.Mostafa Posted July 14, 2019 Author Share Posted July 14, 2019 addEvent ( "setTheDSound", true ) addEventHandler ( "setTheDSound", root, function(link) if ( isElement ( mysound ) ) then destroyElement ( mysound ) end mysound = playSound3D(link, -1233.9285888672, 456.3063659668, 6.4603748321533, true) setSoundMaxDistance(mysound, 25) setSoundVolume(mysound, 20.0) guiSetEnabled(GUIEditor.button[1], false) end ) addEventHandler("onClientSoundStarted", mysound, function(rsn) if rsn == "play" then outputChatBox("started",255,0,0,true) length_s = getSoundLength(mysound) outputChatBox(length_s,255,0,0,true) end end ) ما اشتغل @N3xT @NX_CI Link to comment
Rockyz Posted July 14, 2019 Share Posted July 14, 2019 (edited) addEventHandler("onClientSoundStarted", resourceRoot, function(reason) if source == mysound and reason == "play" then outputChatBox("started", 255, 0, 0, true) local length_s = getSoundLength(source) outputChatBox(tostring(length_s), 255, 0, 0, true) end end) Edited July 14, 2019 by #,xiRocKyz Link to comment
Mr.Mostafa Posted July 15, 2019 Author Share Posted July 15, 2019 On 14/07/2019 at 19:12, #,xiRocKyz said: addEventHandler("onClientSoundStarted", resourceRoot, function(reason) if source == mysound and reason == "play" then outputChatBox("started", 255, 0, 0, true) local length_s = getSoundLength(source) outputChatBox(tostring(length_s), 255, 0, 0, true) end end) Expand ما ظبط + ما يطلع شي في الشات ض Link to comment
iMr.WiFi..! Posted July 15, 2019 Share Posted July 15, 2019 On 15/07/2019 at 01:09, Mr.Mostafa said: ما ظبط + ما يطلع شي في الشات ض Expand تأكد من تطابق السورس مع تعريف المتغير الذي تم انشائه لتشغيل الصوت. Link to comment
Mr.Mostafa Posted July 15, 2019 Author Share Posted July 15, 2019 On 15/07/2019 at 03:04, iMr.WiFi..! said: تأكد من تطابق السورس مع تعريف المتغير الذي تم انشائه لتشغيل الصوت. Expand متاكد منه Link to comment
Hakan Posted July 15, 2019 Share Posted July 15, 2019 addEventHandler("onClientSoundStream",root,function ( Type , Length ) if ( source == mysound and Type ) then outputChatBox("Length: "..math.floor(Length)) end end) Link to comment
Mr.Mostafa Posted July 15, 2019 Author Share Posted July 15, 2019 On 15/07/2019 at 03:05, Hakan said: addEventHandler("onClientSoundStream",root,function ( Type , Length ) if ( source == mysound and Type ) then outputChatBox("Length: "..math.floor(Length)) end end) Expand كفو , تسلم 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