Jump to content

x[ طلب اكواد ]x ارجو الدخول


Recommended Posts

السﻻم عليكم ورحمة الله وبركاته

ابغا كودين

الكود الاول

اذا حددت شيء في القريد ﻻست تطلعلك لوحه ثانية

الكود الثاني اذا حددت شيء من الكومبو بوكس تطلعلك لوحة ثانية

اتمنى انكم فهمتوني والسلام عليكم

Link to comment

تفضل يخوي
الكود الاول حق القريد لست

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
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
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
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
1 hour ago, Debo15 said:

guiGridListSetItemData
--
guiGridListGetSelectedItem

سوي ذول 

لانو طريقتك لو كان المتغيرات بالجريد ليست كثيره وقتها بكون مصيبه

 

هو عنده كم خيار, + برضو طريقتك صحيحه .

  • Like 1
Link to comment

طريقه ثانيه للافاده 

_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)

 

  • Like 2
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...