kokoseda Posted September 9, 2016 Share Posted September 9, 2016 السلام عليكم انا عندي مشكلة بنافذة ال Window ماتظهر حاولت اسويها ماقدرت ضفت كود guiSetVisible (GUIEditor.window[1], false ) لكن ماقدرت اسويها ابيكم تساعدوني لاهنتم :* الكلينت : GUIEditor = { button = {}, window = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(379, 153, 521, 466, "Quran Mode", false) guiSetVisible (GUIEditor.window[1], false ) -- حطيته ترو وفولز ولم تضبط guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(181, 115, 188, 55, "Bakra", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF15E929") GUIEditor.button[2] = guiCreateButton(181, 225, 188, 55, "Al-Khf", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF15E929") GUIEditor.button[3] = guiCreateButton(177, 341, 188, 55, "Al-Ankbot", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF15E929") GUIEditor.label[1] = guiCreateLabel(411, 422, 96, 19, "By kokoseda", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(40, 424, 96, 19, "v 1.0.0", false, GUIEditor.window[1]) end function sound ()-- سويت للزر الاول لكن ماضبط ،، راح اسوي فنكشنات ثانيه واسوي الازرار الي بعدها if GUIEditor.button[1] then playSound ( http://b.top4top.net/d_a2c43d30dc1.mp3 , [throttled = true ] ) end end addEventHandler( "onClientGUIClick", sound ) function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F12", "down", OpenWin)--???? ??? Link to comment
</Mr.Tn6eL> Posted September 9, 2016 Share Posted September 9, 2016 (edited) if source == GUIEditor.button[1] then playSound("http://b.top4top.net/d_a2c43d30dc1.mp3", false, true) Edited September 9, 2016 by </Mr.Tn6eL> Link to comment
N3xT Posted September 9, 2016 Share Posted September 9, 2016 GUIEditor = { button = {}, window = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(379, 153, 521, 466, "Quran Mode", false) guiSetVisible (GUIEditor.window[1], false ) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(181, 115, 188, 55, "Bakra", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF15E929") GUIEditor.button[2] = guiCreateButton(181, 225, 188, 55, "Al-Khf", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF15E929") GUIEditor.button[3] = guiCreateButton(177, 341, 188, 55, "Al-Ankbot", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF15E929") GUIEditor.label[1] = guiCreateLabel(411, 422, 96, 19, "By kokoseda", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(40, 424, 96, 19, "v 1.0.0", false, GUIEditor.window[1]) end) function sound () if source == GUIEditor.button[1] then if isElement(sounds) then destroyElement(sounds) end local sounds = playSound("http://b.top4top.net/d_a2c43d30dc1.mp3", false, true) end end addEventHandler( "onClientGUIClick", sound ) function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) == true then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F12", "down", OpenWin) Link to comment
Ahmed Ly Posted September 9, 2016 Share Posted September 9, 2016 (edited) GUIEditor = { button = {}, window = {}, label = {} } GUIEditor.window[1] = guiCreateWindow(379, 153, 521, 466, "Quran Mode", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible (GUIEditor.window[1], false ) -- حطيته ترو وفولز ولم تضبط GUIEditor.button[1] = guiCreateButton(181, 115, 188, 55, "Bakra", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF15E929") GUIEditor.button[2] = guiCreateButton(181, 225, 188, 55, "Al-Khf", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF15E929") GUIEditor.button[3] = guiCreateButton(177, 341, 188, 55, "Al-Ankbot", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF15E929") GUIEditor.label[1] = guiCreateLabel(411, 422, 96, 19, "By kokoseda", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(40, 424, 96, 19, "v 1.0.0", false, GUIEditor.window[1]) function sound () if GUIEditor.button[1] then if isElement(sound) then stopSound(sound) end sound = playSound ("http://b.top4top.net/d_a2c43d30dc1.mp3") end end addEventHandler( "onClientGUIClick",root, sound ) function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F12", "down", OpenWin) Edited September 9, 2016 by Ahmed Ly Link to comment
N3xT Posted September 9, 2016 Share Posted September 9, 2016 34 minutes ago, Ahmed Ly said: GUIEditor = { button = {}, window = {}, label = {} } GUIEditor.window[1] = guiCreateWindow(379, 153, 521, 466, "Quran Mode", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible (GUIEditor.window[1], false ) -- حطيته ترو وفولز ولم تضبط GUIEditor.button[1] = guiCreateButton(181, 115, 188, 55, "Bakra", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF15E929") GUIEditor.button[2] = guiCreateButton(181, 225, 188, 55, "Al-Khf", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF15E929") GUIEditor.button[3] = guiCreateButton(177, 341, 188, 55, "Al-Ankbot", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF15E929") GUIEditor.label[1] = guiCreateLabel(411, 422, 96, 19, "By kokoseda", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(40, 424, 96, 19, "v 1.0.0", false, GUIEditor.window[1]) function sound () if GUIEditor.button[1] then if isElement(sound) then stopSound(sound) end sound = playSound ("http://b.top4top.net/d_a2c43d30dc1.mp3") end end addEventHandler( "onClientGUIClick",root, sound ) function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F12", "down", OpenWin) كودك غلط, بالحدث حق ظغط الزر ماحطيت سورس وبتشغيل الصوت ناقصك أرقمنتات 1 Link to comment
kokoseda Posted September 9, 2016 Author Share Posted September 9, 2016 يعطيكم العافيه لكن مافهمت السطرين if isElement(sounds) then destroyElement(sounds) end local sounds = playSound("http://b.top4top.net/d_a2c43d30dc1.mp3", false, true) ممكن تشرحونهم Link to comment
' A F . Posted September 9, 2016 Share Posted September 9, 2016 الكود الاول يتحقق لو انك مشغل الاغنية يطفيها لك . والكود الثاني يشغل لك الاغنية . 1 Link to comment
kokoseda Posted September 9, 2016 Author Share Posted September 9, 2016 ما اشتغل الصوت ليه ؟؟ Link to comment
kokoseda Posted September 9, 2016 Author Share Posted September 9, 2016 6 hours ago, N3xT said: تأكد من الرابط تأكدت مافيه شي .. Link to comment
kokoseda Posted September 9, 2016 Author Share Posted September 9, 2016 1 hour ago, N3xT said: وش يجيك بالديبق مافهمتك وش الدي بق Link to comment
RolEx Posted September 9, 2016 Share Posted September 9, 2016 2 hours ago, kokoseda said: مافهمتك وش الدي بق debugscript 3 يطلع لك الاخطاء اللي تصير بالسكربت 1 Link to comment
kokoseda Posted September 10, 2016 Author Share Posted September 10, 2016 الخطأ مكتوب : WARNING: Quran\client.lua:26: Bad argument @ 'addEventHandler' [Expected element at argument 2,got function Link to comment
TAPL Posted September 10, 2016 Share Posted September 10, 2016 اطرح الكود الي تستخدمه 1 Link to comment
kokoseda Posted September 10, 2016 Author Share Posted September 10, 2016 10 minutes ago, TAPL said: اطرح الكود الي تستخدمه addEventHandler( "onClientGUIClick", sound ) Link to comment
N3xT Posted September 10, 2016 Share Posted September 10, 2016 GUIEditor = { button = {}, window = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(379, 153, 521, 466, "Quran Mode", false) guiSetVisible (GUIEditor.window[1], false ) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(181, 115, 188, 55, "Bakra", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF15E929") GUIEditor.button[2] = guiCreateButton(181, 225, 188, 55, "Al-Khf", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF15E929") GUIEditor.button[3] = guiCreateButton(177, 341, 188, 55, "Al-Ankbot", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF15E929") GUIEditor.label[1] = guiCreateLabel(411, 422, 96, 19, "By kokoseda", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(40, 424, 96, 19, "v 1.0.0", false, GUIEditor.window[1]) end) function sound () if source == GUIEditor.button[1] then if isElement(sounds) then destroyElement(sounds) end local sounds = playSound("http://b.top4top.net/d_a2c43d30dc1.mp3", false, true) end end addEventHandler( "onClientGUIClick", root, sound ) function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) == true then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F12", "down", OpenWin) Link to comment
kokoseda Posted September 10, 2016 Author Share Posted September 10, 2016 كفو اشتغل معي لكن ابي اعرف سبب المشكله ،، ليه حطيت روت عند الايفنت ؟؟ ! 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