С ō π α πღ Posted February 27, 2014 Share Posted February 27, 2014 السلام عليكم, أخباركَكم آن شاءالله بخير ومآتشكون من بآ آ س .. addEventHandler("onClientResourceStart", resourceRoot, function() playSound("amg/sound.mp3") end) حاولت وسويت كذا آ addEventHandler("onClientGUIClick",root, function () if ( source == stopM ) then stopSound( "amg/sound.mp3",false ) end end ) يتوقف الصوت stopM أبي يوم يضغط اللاعب على زر Link to comment
فاّرس Posted February 27, 2014 Share Posted February 27, 2014 stopSound(sound) sound = سوي متغير للصوت Link to comment
С ō π α πღ Posted February 27, 2014 Author Share Posted February 27, 2014 كذا قصدكك . addEventHandler("onClientResourceStart", resourceRoot, function() sound = playSound("amg/sound.mp3") end) addEventHandler("onClientGUIClick",root, function () if ( source == stopM ) then stopSound( "amg/sound.mp3",false ) end end ) نفس الشي Link to comment
K1NG Posted February 27, 2014 Share Posted February 27, 2014 كذا قصدكك . addEventHandler("onClientResourceStart", resourceRoot, function() sound = playSound("amg/sound.mp3") end) addEventHandler("onClientGUIClick",root, function () if ( source == stopM ) then stopSound( "amg/sound.mp3",false ) end end ) نفس الشي local sound addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) sound = playSound ( "amg/sound.mp3" ) end ) addEventHandler ( "onClientGUIClick", stopM, function ( ) stopSound ( sound ) end, false ) Link to comment
С ō π α πღ Posted February 27, 2014 Author Share Posted February 27, 2014 كذا قصدكك . addEventHandler("onClientResourceStart", resourceRoot, function() sound = playSound("amg/sound.mp3") end) addEventHandler("onClientGUIClick",root, function () if ( source == stopM ) then stopSound( "amg/sound.mp3",false ) end end ) نفس الشي local sound addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) sound = playSound ( "amg/sound.mp3" ) end ) addEventHandler ( "onClientGUIClick", stopM, function ( ) stopSound ( sound ) end, false ) جربت ماطفي , Link to comment
K1NG Posted February 27, 2014 Share Posted February 27, 2014 كذا قصدكك . addEventHandler("onClientResourceStart", resourceRoot, function() sound = playSound("amg/sound.mp3") end) addEventHandler("onClientGUIClick",root, function () if ( source == stopM ) then stopSound( "amg/sound.mp3",false ) end end ) نفس الشي local sound addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) sound = playSound ( "amg/sound.mp3" ) end ) addEventHandler ( "onClientGUIClick", stopM, function ( ) stopSound ( sound ) end, false ) جربت ماطفي , .. إطرح كودكـ كامل مع كود إنشاء الزر Link to comment
С ō π α πღ Posted February 27, 2014 Author Share Posted February 27, 2014 local sound addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) sound = playSound ( "amg/sound.mp3" ) end ) addEventHandler ( "onClientGUIClick", stopM, function ( ) stopSound ( sound ) end, false ) wnd = guiCreateWindow(450, 227, 287, 300, "", false) stopM = guiCreateButton(66, 112, 156, 82, "اطفاء", false, wnd) guiSetVisible(wnd, false) bindKey("f1", "down", function() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end) , Link to comment
K1NG Posted February 27, 2014 Share Posted February 27, 2014 local sound addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) sound = playSound ( "amg/sound.mp3" ) end ) addEventHandler ( "onClientGUIClick", stopM, function ( ) stopSound ( sound ) end, false ) wnd = guiCreateWindow(450, 227, 287, 300, "", false) stopM = guiCreateButton(66, 112, 156, 82, "اطفاء", false, wnd) guiSetVisible(wnd, false) bindKey("f1", "down", function() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end) , * Client Side: local sound addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) wnd = guiCreateWindow(450, 227, 287, 300, "", false) stopM = guiCreateButton(66, 112, 156, 82, "اطفاء", false, wnd) guiSetVisible(wnd, false) sound = playSound ( "amg/sound.mp3" ) addEventHandler ( "onClientGUIClick", stopM, function ( ) stopSound ( sound ) end, false ) end ) bindKey ( "F1", "down", function ( ) guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) Link to comment
С ō π α πღ Posted February 27, 2014 Author Share Posted February 27, 2014 ي لبى قلبكك ي كنقق ققسم كفيت ووفيتَ , أيه زأأبط .. لأهنت عالمسآعدهة *و شكرا لـ ذابيست Link to comment
ΞĪŚŚÀ Posted February 27, 2014 Share Posted February 27, 2014 ابي استفيد لو سويت زر تشغيل ممكن عطوني كود ّ! Link to comment
K1NG Posted February 28, 2014 Share Posted February 28, 2014 ابي استفيدلو سويت زر تشغيل ممكن عطوني كود ّ! * Client Side: local sound addEventHandler ( "onClientGUIClick", اسم الزر, function ( ) if ( isElement ( sound ) ) then destroyElement ( sound ) end sound = playSound ( "soundPath" ) end, false ) 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