AL-SAYED Posted July 23, 2013 Share Posted July 23, 2013 for i,v in ipairs( Sound ) do local row = guiGridListAddRow( Gird ) guiGridListSetItemText( Gird, row, 1, v[1], false, false ) --باد ارقمنت end Link to comment
#DRAGON!FIRE Posted July 23, 2013 Share Posted July 23, 2013 for i,v in ipairs( Sound ) do local row = guiGridListAddRow( Gird ) guiGridListSetItemText( Gird, row, 1, v[1], false, false ) --باد ارقمنت end # اطرح الكود كامل لو المشكلة مو هنا # + شوف السنتكس حقه Syntax bool guiGridListSetItemText ( element gridList, int rowIndex, int columnIndex, string text, bool section, bool number ) # + الارقمنات Required Arguments gridList: The grid list element rowIndex: Row ID columnIndex: Column ID text: The text you want to put in (does NOT accept numbers, use tostring() for that) section: Determines if the item is a section number: Tells whether the text item is a number value or not (used for sorting) Link to comment
AL-SAYED Posted July 23, 2013 Author Share Posted July 23, 2013 Image1 = guiCreateStaticImage(835, 431, 360, 417, ":mp3/2.png", false) Gird = guiCreateGridList(115, 17, 127, 189, false, Image1) Image2 = guiCreateStaticImage(153, 275, 48, 44, ":mp3/1.png", false,Image1 ) Image3 = guiCreateStaticImage(153, 275, 48, 44, ":mp3/3.png", false, Image1) local Sound = { { "TEST","URL" }, } for i,v in ipairs( Sound ) do local row = guiGridListAddRow( Gird ) guiGridListSetItemText( Gird, row, 1, v[1], false, false ) --باد ارقمنت end addEventHandler('OnClientGUIDoubleClick',Image2, function ( ) if guiGridListGetSelectedItem ( Gird ) ~= -1 then if isElement ( sound ) then destroyElement ( sound ) end sound = playSound ( guiGridListGetItemData ( Gird,MyRow,1 ) ) outputChatBox(' Sound Loading ...') guiSetVisible ( Image2, false ) end end,false ) Link to comment
فاّرس Posted July 23, 2013 Share Posted July 23, 2013 جرب ضيف الكود , guiGridListSetItemData ( Grid,row,1,v[2] ) بعد السطر ذا , guiGridListSetItemText( Gird, row, 1, v[1], false, false ) + سطر 20 MyRow مو معرف ذذ + الكود حق برستيج تنتيف Link to comment
3NAD Posted July 23, 2013 Share Posted July 23, 2013 مو مرتاح لـ الإيفنت هذا : )))) addEventHandler('OnClientGUIDoubleClick',Image2, function ( ) if guiGridListGetSelectedItem ( Gird ) ~= -1 then if isElement ( sound ) then destroyElement ( sound ) end sound = playSound ( guiGridListGetItemData ( Gird,MyRow,1 ) ) outputChatBox(' Sound Loading ...') guiSetVisible ( Image2, false ) end end,false ) Link to comment
فاّرس Posted July 23, 2013 Share Posted July 23, 2013 مو مرتاح لـ الإيفنت هذا : )))) addEventHandler('OnClientGUIDoubleClick',Image2, function ( ) if guiGridListGetSelectedItem ( Gird ) ~= -1 then if isElement ( sound ) then destroyElement ( sound ) end sound = playSound ( guiGridListGetItemData ( Gird,MyRow,1 ) ) outputChatBox(' Sound Loading ...') guiSetVisible ( Image2, false ) end end,false ) منتوف من كود برستيج , addEventHandler('onClientGUIClick',Button, function ( ) if guiGridListGetSelectedItem ( GridList ) ~= -1 then if isElement ( sound ) then destroyElement ( sound ) end sound = playSound ( guiGridListGetItemData ( GridList,MyRow,1 ) ) outputChatBox(' Sound Loading ...') end end,false ) بس غير في الايفنت والدليل انه حاط MyRow وهو اصلا موب موجود Link to comment
|Mr|-Talal07-| Posted July 23, 2013 Share Posted July 23, 2013 Image1 = guiCreateStaticImage(835, 431, 360, 417, ":mp3/2.png", false) Gird = guiCreateGridList(115, 17, 127, 189, false, Image1) Image2 = guiCreateStaticImage(153, 275, 48, 44, ":mp3/1.png", false,Image1 ) Image3 = guiCreateStaticImage(153, 275, 48, 44, ":mp3/3.png", false, Image1) local Sound = { { "TEST","URL" }, } for i,v in ipairs( Sound ) do local row = guiGridListAddRow( Gird ) guiGridListSetItemText( Gird, row, 1, v[1][1], false, false ) guiGirdListSetItemData(Gird,row,1,v[1][2],false,false) end addEventHandler('OnClientGUIDoubleClick',Image2, function ( ) if guiGridListGetSelectedItem ( Gird ) ~= -1 then if isElement ( sound ) then destroyElement ( sound ) end sound = playSound ( guiGridListGetItemData ( Gird,MyRow,1 ) ) outputChatBox(' Sound Loading ...') guiSetVisible ( Image2, false ) end end,false ) Link to comment
Bssol Posted July 23, 2013 Share Posted July 23, 2013 (edited) اخوي انت ناسي تحط guiGridListAddColumn + عندك كم خطأ التصحيح Image1 = guiCreateStaticImage(835, 431, 360, 417, ":mp3/2.png", false) Gird = guiCreateGridList(115, 17, 127, 189, false, Image1) guiGridListAddColumn( Gird, "Sound", 0.85 ) Image2 = guiCreateStaticImage(153, 275, 48, 44, ":mp3/1.png", false,Image1 ) Image3 = guiCreateStaticImage(153, 275, 48, 44, ":mp3/3.png", false, Image1) local Sound = { { "TEST","URL" }, } for i,v in ipairs( Sound ) do local row = guiGridListAddRow( Gird ) guiGridListSetItemText( Gird, row, 1, v[1], false, false ) guiGridListSetItemData(Gird,row,1,v[2]) end addEventHandler("onClientGUIDoubleClick",Image2, function ( ) local myRow = guiGridListGetSelectedItem ( Gird ) if myRow ~= -1 then if isElement ( sound ) then destroyElement ( sound ) end sound = playSound ( guiGridListGetItemData ( Gird,myRow,1 ) ) outputChatBox(' Sound Loading ...') guiSetVisible ( Image2, false ) end end,false ) تم تصحيح الكود بالكامل، اتمنى ما اكون نسيت شي ذذ Edited July 24, 2013 by Guest Link to comment
Bssol Posted July 24, 2013 Share Posted July 24, 2013 تم تصحيح الايفنت، مشكور اخ عناد على التنبيه ذذ 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