αвυ-wαleed Posted February 14, 2014 Posted February 14, 2014 السلام عليكم هذا كود يطلع صوت الشيلة في مكان محدد [lua]function onResourceStart() local sound = playSound3D("aa.mp3", -1490.0997314453, 762.89318847656, 8.3803997039795, true) setSoundMaxDistance(sound, 25) setSoundVolume(sound, 20.0) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart) [/lua] ابغى اخليه تشتغل اذا ضغطت على الزر هذا addEventHandler("onClientGUIClick",root, function () if ( source == M2 ) then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) guiSetInputEnabled(false) end end ) ولحد يخاف من الذنوب لاني والله العظيم بحطها شيلات مو اغاني
#DRAGON!FIRE Posted February 14, 2014 Posted February 14, 2014 (edited) addEventHandler( "onClientGUIClick", resourceRoot, function ( ) if ( source == M2 ) then if ( isElement( sound ) ) then destroyElement( sound ) end local sound = playSound3D("aa.mp3", -1490.0997314453, 762.89318847656, 8.3803997039795, true) setSoundMaxDistance(sound, 25) setSoundVolume(sound, 20.0) guiSetVisible( GUIEditor_Window[1], false ) showCursor( false ) guiSetInputEnabled( false ) end end ) Edited February 14, 2014 by Guest
فاّرس Posted February 14, 2014 Posted February 14, 2014 (edited) -- Client Side # addEventHandler('onClientGUIClick',M2,function () if isElement(sound) then destroyElement(sound) end sound = playSound3D('aa.mp3', -1490.0997314453, 762.89318847656, 8.3803997039795, true) setSoundMaxDistance(sound, 25) setSoundVolume(sound, 20.0) guiSetVisible(GUIEditor_Window[1],false) showCursor(false) guiSetInputEnabled(false) end,false ) Edited February 14, 2014 by Guest
αвυ-wαleed Posted February 14, 2014 Author Posted February 14, 2014 تم التجربة وشغال %100 مشكووور ياكنق زاحف
αвυ-wαleed Posted February 14, 2014 Author Posted February 14, 2014 ومشكور ذا بست لكن اش غيرت وليه ؟؟؟
فاّرس Posted February 14, 2014 Posted February 14, 2014 خليته يتحقق من ان اذا مثلا فتح النافذه مره ثانيه وضغط الزر يشغل الصوت من جديد عشان ما يكرر ,,
#DRAGON!FIRE Posted February 14, 2014 Posted February 14, 2014 تم التجربة وشغال %100 مشكووور ياكنق زاحف حياك الله .. انسخ الكود مرة ثانية نسيت احط شي بسيط ذذ
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