Jump to content

مشكله بالقريد ياليت تساعدوني


Professor

Recommended Posts

السلام عليكم ورحمه الله

ششباب انا سويت نافذه فيها قريد

واحد للشخصيات

والثاني سيارات

وعندي مشكله ممكن تحلونها لي

( انا مابغى اطرح الكود كامل )

  
GUIEditor_Label = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Grid[1] = guiCreateGridList(10,23,220,250,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],1) 
guiGridListSetSelectionMode(GUIEditor_Grid[2],1) 
guiGridListAddColumn(GUIEditor_Grid[1],"Skin",0.9) 
guiGridListAddColumn(GUIEditor_Grid[2],"Cars",0.9) 
GUIEditor_Button[1] = guiCreateButton(10,288,96,46,"1",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(127,287,96,46,"2",false,GUIEditor_Window[1]) 
  
skin1 = { 
    {46}, 
    {45}, 
    } 
     
Cars = { 
    {511}, 
    {512}, 
    } 
  
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if ( source == GUIEditor_Button[1] ) then 
            guiGridListClear(GUIEditor_Grid[1]) 
            for i,v in ipairs(skin1) do 
                local row = guiGridListAddRow(GUIEditor_Grid[1]) 
                guiGridListSetItemText(GUIEditor_Grid[1],row,1,tostring(v[1]),false,false) 
            end 
        end 
    end 
) 
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if ( source == GUIEditor_Button[2] ) then 
            guiGridListClear(GUIEditor_Grid[2]) 
            for i,v in ipairs(Cars) do 
                local row = guiGridListAddRow(GUIEditor_Grid[2]) 
                guiGridListSetItemText(GUIEditor_Grid[2],row,1,tostring(v[1]),false,false) 
            end 
        end 
    end 
) 
  
addEventHandler("onClientGUIClick",root, 
    function () 
        local sel = guiGridListGetSelectedItem(GUIEditor_Grid[1]) 
        local text = guiGridListGetItemText(GUIEditor_Grid[1],sel,1) 
        if ( source == GUIEditor_Grid[1] ) then 
            setElementModel(localPlayer,tonumber(text)) 
        end 
    end 
) 
  

القريد الاول حق الشخصيات شغال

باقي حق السيارات اظغط على زر 2 مايطلع لي القريد

:arrowleft::mrgreen:

Link to comment
انت تبي اذا ضغطت زر يصير قريد للسيارات واذا ضغطت مرة ثانية يصير للشخصيات؟

لا , ققلبو

فيه ازرار

انا ابغى احط زر رقم 1

قريد الشخصيات

وزر رقم 2

قريد السيارات

!

اتمنى وضحت الفككره

:arrowleft:

Link to comment
انت تبي اذا ضغطت زر يصير قريد للسيارات واذا ضغطت مرة ثانية يصير للشخصيات؟

لا , ققلبو

فيه ازرار

انا ابغى احط زر رقم 1

قريد الشخصيات

وزر رقم 2

قريد السيارات

!

اتمنى وضحت الفككره

:arrowleft:

طيب وش المشكلة ومثل ماقال تابل مافيه الا قريد واحد

Link to comment
انت تبي اذا ضغطت زر يصير قريد للسيارات واذا ضغطت مرة ثانية يصير للشخصيات؟

لا , ققلبو

فيه ازرار

انا ابغى احط زر رقم 1

قريد الشخصيات

وزر رقم 2

قريد السيارات

!

اتمنى وضحت الفككره

:arrowleft:

طيب وش المشكلة ومثل ماقال تابل مافيه الا قريد واحد

سويت قريد ثاني ونفس المشكله ذذ

Link to comment
طيب حط القريد الي سويته
    GUIEditor_Label = {} 
    GUIEditor_Grid = {} 
      
    GUIEditor_Grid[1] = guiCreateGridList(10,23,220,250,false,GUIEditor_Window[1]) 
    GUIEditor_Grid[2] = guiCreateGridList(10,23,220,250,false,GUIEditor_Window[1]) 
    guiGridListSetSelectionMode(GUIEditor_Grid[1],1) 
    guiGridListSetSelectionMode(GUIEditor_Grid[2],1) 
    guiGridListAddColumn(GUIEditor_Grid[1],"Skin",0.9) 
    guiGridListAddColumn(GUIEditor_Grid[2],"Cars",0.9) 
    GUIEditor_Button[1] = guiCreateButton(10,288,96,46,"1",false,GUIEditor_Window[1]) 
    GUIEditor_Button[2] = guiCreateButton(127,287,96,46,"2",false,GUIEditor_Window[1]) 
      
    skin1 = { 
        {46}, 
        {45}, 
        } 
        
    Cars = { 
        {511}, 
        {512}, 
        } 
      
      
    addEventHandler("onClientGUIClick",root, 
        function () 
            if ( source == GUIEditor_Button[1] ) then 
                guiGridListClear(GUIEditor_Grid[1]) 
                for i,v in ipairs(skin1) do 
                    local row = guiGridListAddRow(GUIEditor_Grid[1]) 
                    guiGridListSetItemText(GUIEditor_Grid[1],row,1,tostring(v[1]),false,false) 
                end 
            end 
        end 
    ) 
      
    addEventHandler("onClientGUIClick",root, 
        function () 
            if ( source == GUIEditor_Button[2] ) then 
                guiGridListClear(GUIEditor_Grid[2]) 
                for i,v in ipairs(Cars) do 
                    local row = guiGridListAddRow(GUIEditor_Grid[2]) 
                    guiGridListSetItemText(GUIEditor_Grid[2],row,1,tostring(v[1]),false,false) 
                end 
            end 
        end 
    ) 
      
    addEventHandler("onClientGUIClick",root, 
        function () 
            local sel = guiGridListGetSelectedItem(GUIEditor_Grid[1]) 
            local text = guiGridListGetItemText(GUIEditor_Grid[1],sel,1) 
            if ( source == GUIEditor_Grid[1] ) then 
                setElementModel(localPlayer,tonumber(text)) 
            end 
        end 
    ) 
      
  
  
  

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...