Adham Posted July 7, 2016 Share Posted July 7, 2016 سلام عليكم انا ابي اسوي جدول وفيه مثلن {"Adham",mp3} انا ابي اسوي اذا حدد شي بالقريد لست وضعط علي زر تشتغل الاغنيه المكتبوه في الجدول وزر يقفل الاغنيه Link to comment
' A F . Posted July 7, 2016 Share Posted July 7, 2016 guiGridListAddRow guiGridListSetItemText guiGridListSetItemData guiGridListGetSelectedItem guiGridListGetItemData isElement destroyElement playSound Link to comment
Adham Posted July 7, 2016 Author Share Posted July 7, 2016 مش عارف صح ولا لا for i , v in ipairs ( Songs ) do Row = guiGridListAddRow ( gridlist2 ) guiGridListSetItemText( gridlist2,Row ,cow1,v[1],false,false) guiGridListSetItemText( gridlist2,Row ,cow2,v[2],false,false) guiGridListSetItemData ( gridlist2 , Row , cow2 , v[2] ,false,false) end addEventHandler("onClientGUIClick",resourceRoot, function ( ) if source == song then local Se = guiGridListGetSelectedItem( gridlist ) local Song = guiGridListGetItemData ( gridlist , Se , 1 ) isElement ( Song ) destroyElement ( Song ) playSound ( Song ) end end end) Link to comment
' A F . Posted July 7, 2016 Share Posted July 7, 2016 for i , v in ipairs ( Songs ) do Row = guiGridListAddRow ( gridlist2 ) guiGridListSetItemText( gridlist2,Row ,cow1,v[1],false,false) guiGridListSetItemText( gridlist2,Row ,cow2,v[2],false,false) guiGridListSetItemData ( gridlist2 , Row , cow2 , v[2] ,false,false) end addEventHandler("onClientGUIClick",resourceRoot, function ( ) if source == song then local Se = guiGridListGetSelectedItem( gridlist2 ) local Song = guiGridListGetItemData ( gridlist2 , Se , cow2 ) if ( isElement ( Song_ ) ) then destroyElement ( Song_ ) end Song_ = playSound ( tostring ( Song ) , true ) end end ) لم يتم التجربة ------ اذا ماظبط اطرح لي الكلنت كآمل . Link to comment
Adham Posted July 7, 2016 Author Share Posted July 7, 2016 بيقلي خطا في هنا وشو هوا {"Sond", song.mp3}, Link to comment
' A F . Posted July 7, 2016 Share Posted July 7, 2016 خلي ال song.mp3 بين سترنق تكون هيك "song.mp3" Link to comment
Adham Posted July 7, 2016 Author Share Posted July 7, 2016 م ظبت وم يظهر بالقريد لست والرو تبعي 1 والقريد لست GUIEditor.gridlist[1] Link to comment
Adham Posted July 7, 2016 Author Share Posted July 7, 2016 لما عملتها كدا م شتغلت Songs = { {"2","Sond", "song.mp3"}, {"1","Adham","mission_accomplished.mp3"}, } for i , v in ipairs ( Songs ) do local row2 = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],row2 ,1,v[1],false,false); guiGridListSetItemText(GUIEditor.gridlist[1],row2 ,2,v[2],false,false); guiGridListSetItemData (GUIEditor.gridlist[1] , row2 , 2 , v[2] ,false,false) end Link to comment
MR.GRAND Posted July 7, 2016 Share Posted July 7, 2016 لما عملتها كدا م شتغلت Songs = { {"2","Sond", "song.mp3"}, {"1","Adham","mission_accomplished.mp3"}, } for i , v in ipairs ( Songs ) do local row2 = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],row2 ,1,v[1],false,false); guiGridListSetItemText(GUIEditor.gridlist[1],row2 ,2,v[2],false,false); guiGridListSetItemData (GUIEditor.gridlist[1] , row2 , 2 , v[2] ,false,false) end VALUE 3 ? Link to comment
Kara Posted July 7, 2016 Share Posted July 7, 2016 Songs = { {"اغنية مستر لعبه","sound3.mp3"}, {"اغنية كارا","sound4.mp3"}, } grilistmusic = guiCreateGridList Start = guiCreateButton Stop = guiCreateButton for _,v in ipairs ( Songs ) do local row = guiGridListAddRow(grilistmusic) guiGridListSetItemText ( grilistmusic, row, 1, tostring ( v [ 1 ] ), false, false) guiGridListSetItemData ( grilistmusic, row, 1, tostring ( v [ 2 ] )) end addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == Start ) then if ( isElement ( sound ) ) then destroyElement ( sound ) end if ( guiGridListGetSelectedItem ( grilistmusic ) ~= -1 ) then local Link = guiGridListGetItemData ( grilistmusic, guiGridListGetSelectedItem ( grilistmusic ), 1 ) sound = playSound ( tostring ( Link ), true ) end end end ) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == Stop ) then if ( isElement ( sound ) ) then destroyElement ( sound ) end end end ) 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