Jump to content

x[ طلب ]x فانكشنات


Recommended Posts

سلام عليكم انا ابي اسوي جدول وفيه

مثلن

{"Adham",mp3}

انا ابي اسوي

اذا حدد شي بالقريد لست

وضعط علي زر

تشتغل الاغنيه المكتبوه في الجدول

وزر يقفل الاغنيه

Link to comment

مش عارف صح ولا لا

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

لما عملتها كدا م شتغلت

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
لما عملتها كدا م شتغلت

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

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