Jercko Posted March 14, 2018 Share Posted March 14, 2018 السﻻم عليكم ورحمة الله وبركاته ابغا كودين الكود الاول اذا حددت شيء في القريد ﻻست تطلعلك لوحه ثانية الكود الثاني اذا حددت شيء من الكومبو بوكس تطلعلك لوحة ثانية اتمنى انكم فهمتوني والسلام عليكم Link to comment
Rakan# Posted March 14, 2018 Share Posted March 14, 2018 (edited) onClientGUIClick guiGridListGetSelectedItem guiComboBoxGetSelected guiSetVisible Edited March 14, 2018 by Rakan# 1 Link to comment
Jercko Posted March 16, 2018 Author Share Posted March 16, 2018 On ١٤/٣/٢٠١٨ at 16:41, Rakan# said: onClientGUIClick guiGridListGetSelectedItem guiComboBoxGetSelected guiSetVisible سوي الاكواد لاهنت Link to comment
Rakan# Posted March 16, 2018 Share Posted March 16, 2018 25 minutes ago, Pistol515 said: سوي الاكواد لاهنت حاول وبساعدك . Link to comment
Ram, Posted March 16, 2018 Share Posted March 16, 2018 تفضل يخوي الكود الاول حق القريد لست addEventHandler("onClientGUIClick",root,function ( ) if ( source == ButtonName ) then local GridSel = guiGridListGetSelectedItem(GridName) if ( GridSel == -1 ) then outputChatBox("* Select A Row first.",255,0,0) return end if ( GridSel == 0 ) then -- اذا اللاعب ضغط ع الزر وكان مختار الخيار الاول بالقريد لست -- الاكواد elseif ( GridSel == 1 ) then -- اذا اللاعب ضغط ع الزر وكان مختار الخيار الثاني بالقريد لست -- الاكواد -- الخ end end end ) الكود الثاني , = شوي ويكون جاهز الكود الثاني :- addEventHandler("onClientGUIClick",root,function ( ) if ( source == ButtonName ) then local SelCombo = guiComboBoxGetSelected(Comboboxname) local Combotext = guiComboBoxGetItemText(Comboboxname, SelCombo) if ( Combotext == TheComboTextYouWant ) then -- ب النص الي اذا كان مختار يفتح له اللوحة TheComboTextYouWant لا تنسى تغير -- الاكواد حقتك elseif ( ComboText == TheComboTextYouWant2 ) then -- نفس الالية الي فوق, لا تنسى تغير الاسماء -- الاكواد حقتك -- الخ end end end ) Link to comment
Jercko Posted March 16, 2018 Author Share Posted March 16, 2018 14 minutes ago, AbU - W6N said: تفضل يخوي الكود الاول حق القريد لست addEventHandler("onClientGUIClick",root,function ( ) if ( source == ButtonName ) then local GridSel = guiGridListGetSelectedItem(GridName) if ( GridSel == -1 ) then outputChatBox("* Select A Row first.",255,0,0) return end if ( GridSel == 0 ) then -- اذا اللاعب ضغط ع الزر وكان مختار الخيار الاول بالقريد لست -- الاكواد elseif ( GridSel == 1 ) then -- اذا اللاعب ضغط ع الزر وكان مختار الخيار الثاني بالقريد لست -- الاكواد -- الخ end end end ) الكود الثاني , = شوي ويكون جاهز الكود الثاني :- addEventHandler("onClientGUIClick",root,function ( ) if ( source == ButtonName ) then local SelCombo = guiComboBoxGetSelected(Comboboxname) local Combotext = guiComboBoxGetItemText(Comboboxname, SelCombo) if ( Combotext == TheComboTextYouWant ) then -- ب النص الي اذا كان مختار يفتح له اللوحة TheComboTextYouWant لا تنسى تغير -- الاكواد حقتك elseif ( ComboText == TheComboTextYouWant2 ) then -- نفس الالية الي فوق, لا تنسى تغير الاسماء -- الاكواد حقتك -- الخ end end end ) طيب بسألك وين احط اسم اللوحة الي ابغها تطلع Link to comment
Ram, Posted March 16, 2018 Share Posted March 16, 2018 3 minutes ago, Pistol515 said: طيب بسألك وين احط اسم اللوحة الي ابغها تطلع addEventHandler("onClientGUIClick",root,function ( ) if ( source == ButtonName ) then local SelCombo = guiComboBoxGetSelected(Comboboxname) local Combotext = guiComboBoxGetItemText(Comboboxname, SelCombo) if ( Combotext == TheComboTextYouWant ) then -- ب النص الي اذا كان مختار يفتح له اللوحة TheComboTextYouWant لا تنسى تغير guiSetVisible(اسم اللوحة,true) -- الاكواد حقتك elseif ( ComboText == TheComboTextYouWant2 ) then -- نفس الالية الي فوق, لا تنسى تغير الاسماء guiSetVisible(اسم اللوحة,true) -- الاكواد حقتك -- الخ end end end ) الي فوق = حق الكومبو ذا حق القريد addEventHandler("onClientGUIClick",root,function ( ) if ( source == ButtonName ) then local GridSel = guiGridListGetSelectedItem(GridName) if ( GridSel == -1 ) then outputChatBox("* Select A Row first.",255,0,0) return end if ( GridSel == 0 ) then -- اذا اللاعب ضغط ع الزر وكان مختار الخيار الاول بالقريد لست guiSetVisible(اسم اللوحة,true) -- الاكواد elseif ( GridSel == 1 ) then -- اذا اللاعب ضغط ع الزر وكان مختار الخيار الثاني بالقريد لست guiSetVisible(اسم اللوحة,true) -- الاكواد -- الخ end end end ) لا تبخل علينا ب اللايك ي غالي Link to comment
Jercko Posted March 17, 2018 Author Share Posted March 17, 2018 شكرا يخوي يعطيك العافية Link to comment
Ram, Posted March 17, 2018 Share Posted March 17, 2018 3 hours ago, Pistol515 said: شكرا يخوي يعطيك العافية لا تبخل علينا ب اللايك ي كبير ^^ Link to comment
MrBiG Posted March 17, 2018 Share Posted March 17, 2018 On ١٦/٣/٢٠١٨ at 13:09, AbU - W6N said: تفضل يخوي الكود الاول حق القريد لست addEventHandler("onClientGUIClick",root,function ( ) if ( source == ButtonName ) then local GridSel = guiGridListGetSelectedItem(GridName) if ( GridSel == -1 ) then outputChatBox("* Select A Row first.",255,0,0) return end if ( GridSel == 0 ) then -- اذا اللاعب ضغط ع الزر وكان مختار الخيار الاول بالقريد لست -- الاكواد elseif ( GridSel == 1 ) then -- اذا اللاعب ضغط ع الزر وكان مختار الخيار الثاني بالقريد لست -- الاكواد -- الخ end end end ) guiGridListSetItemData -- guiGridListGetSelectedItem سوي ذول لانو طريقتك لو كان المتغيرات بالجريد ليست كثيره وقتها بكون مصيبه Link to comment
Ram, Posted March 17, 2018 Share Posted March 17, 2018 1 hour ago, Debo15 said: guiGridListSetItemData -- guiGridListGetSelectedItem سوي ذول لانو طريقتك لو كان المتغيرات بالجريد ليست كثيره وقتها بكون مصيبه هو عنده كم خيار, + برضو طريقتك صحيحه . 1 Link to comment
#\_oskar_/# Posted March 17, 2018 Share Posted March 17, 2018 طريقه ثانيه للافاده _T = { {Text = "فتح اللوحه الاولي", Name = window1}, {Text = "فتح اللوحه الثانيه", Name = window2}, {Text = "فتح اللوحه الثالثه", Name = window3},} _g = gridlist -- اسم القريد for _K, _G in pairs(_T) do local row = guiGridListAddRow(_g) guiGridListSetItemText(_g,row,1,_G.Text,false,false) guiGridListSetItemData(_g,row,1,_G.Name) end addEventHandler( "onClientGUIClick",_g,function ( ) _R = guiGridListGetSelectedItem(_g) if _R ~= -1 then _D = guiGridListGetItemData(_g,_R,1) if guiGetVisible(_D) == true then return guiSetVisible(_D,false) end guiSetVisible(_D,true) end end,false) 2 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