S4MuEL Posted May 25, 2013 Share Posted May 25, 2013 آلسلآمم عليكمم هل آلكود صحيح آم لآ , آبغآهه لمآ يموت آلآعب يشغل صوت وإذآ مرةة ثآنيةة مآت يجيبلهة صوت ثآني .. addEventHandler("onClientPlayerWasted", root, function() local sounds = math.random(x1.mp3,x2.mp3) playSound("sounds",true) end ) Link to comment
iPrestege Posted May 25, 2013 Share Posted May 25, 2013 خطأ للآسف ذذ سوية تيبل او تقدر تسوي local random = math.random ( 1,2 ) if random == 1 then playSound ( 1 ) else playSound ( 2 ) end Link to comment
S4MuEL Posted May 25, 2013 Author Share Posted May 25, 2013 سسؤآل , آلكود حققي مآ يسوي شي ؟ ! Link to comment
S4MuEL Posted May 25, 2013 Author Share Posted May 25, 2013 ططيب وبآلميتآ آخليهة 1.mp3 ? 2.mp3 ? Link to comment
iPrestege Posted May 25, 2013 Share Posted May 25, 2013 شوف هالمثال طريقتي مجرد شرح لول لاتاخذها خخ : addCommandHandler("sound", function ( ) local RandomSounds = math.random ( 1,2 ) if isElement ( sound ) then stopSound ( sound ) end if ( RandomSounds == 1 ) then sound = playSound ( "1.mp3" ) else sound = playSound ( "2.mp3" ) end end ) طويلة الطريقة جداول اصرف Link to comment
S4MuEL Posted May 25, 2013 Author Share Posted May 25, 2013 ططيب ممكن طريقةة آلجدآول , خلني آتعلمم منهآ ؟ ! .. Link to comment
iPrestege Posted May 25, 2013 Share Posted May 25, 2013 شوف هالمثال للجداول : local aSounds = { "File", "File", "File" } addCommandHandler("PlaySound", function ( ) if isElement ( sound ) then destroyElement ( sound ) end sound = playSound ( aSounds[math.random(#aSounds)] , true ) -- نجيب كل قيم الجدول بـ # ونسويها راندوم عشوائيةة end ) Link to comment
S4MuEL Posted May 25, 2013 Author Share Posted May 25, 2013 آههآ , فهمتهة آلمثآل .. يعطيكـ آلعآففيةة .. Link to comment
PaiN^ Posted May 26, 2013 Share Posted May 26, 2013 كذا مو أحسن ذذ addCommandHandler( 'sound', function( ) local RandomSounds = math.random ( 1,2 ) if isElement ( sound ) then stopSound ( sound ) end sound = playSound ( RandomSounds..'.mp3' ) end ) 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