Jump to content

طلب كود


Recommended Posts

ما جربت

  
Window =         {}; 
GridList =       {}; 
Button =         {}; 
  
Edit[1] = guiCreateEdit(12,75,166,28,"",false) 
Button[1] = guiCreateButton(49, 176, 105, 30, "اغلاق", false) 
GridList[1] = guiCreateGridList(9, 23, 174, 143, false) 
  
  
guiGridListAddColumn(GridList[1], "Word", 0.3) 
  
  
  
List = { 
    { 'word_grid',word_edit'}, 
  
} 
  
for i, c in ipairs ( List ) do 
    local aRow = guiGridListAddRow ( GridList[1] ) 
        guiGridListSetItemText ( GridList[1], aRow, 1, c[1], false, false ) 
end 
  
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if ( source == Button[1] ) then 
         Sword = guiGridListGetItemText ( GridList[1], guiGridListGetSelectedItem ( GridList[1] ), 2 ) 
        guiSetText(Edit[1],Sword) 
        end 
    end 
) 
  
 

Link to comment

تهنيني على ايش

عندك خطأ بالكود حقك

ما جربت
  
Window =         {}; 
GridList =       {}; 
Button =         {}; 
  
Edit[1] = guiCreateEdit(12,75,166,28,"",false) 
Button[1] = guiCreateButton(49, 176, 105, 30, "اغلاق", false) 
GridList[1] = guiCreateGridList(9, 23, 174, 143, false) 
  
  
guiGridListAddColumn(GridList[1], "Word", 0.3) 
  
  
  
List = { 
    { 'word_grid',word_edit'}, 
  
} 
  
for i, c in ipairs ( List ) do 
    local aRow = guiGridListAddRow ( GridList[1] ) 
        guiGridListSetItemText ( GridList[1], aRow, 1, c[1], false, false ) 
end 
  
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if ( source == Button[1] ) then 
         Sword = guiGridListGetItemText ( GridList[1], guiGridListGetSelectedItem ( GridList[1] ), 2 ) 
        guiSetText(Edit[1],Sword) 
        end 
    end 
) 
 

سطر 16 ضايف

علامة تنصيص ناقصه

وخربت كل الكود .. !

المهم لصاحب الموضوع تقدر تسويها كذا

btn = guiCreateButton (...) 
grid = guiCreateGridList (...) 
guiGridListAddColumn (...) 
edit = guiCreateEdit (...) 
  
addEventHandler ("onClientGUIClick", resourceRoot,  
    function () 
        if (source == btn) then 
            local row = guiGridListGetSelectedItem (grid) 
            local select = guiGridListGetItemText (grid, row, 1) 
            if (select and select ~= "") then 
                guiSetText (edit, select) 
            else 
                guiSetText (edit, "") 
            end 
        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...