Jump to content

باد ارقمنت


Recommended Posts

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

مو مرتاح لـ الإيفنت هذا : ))))

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
مو مرتاح لـ الإيفنت هذا : ))))
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 وهو اصلا موب موجود :lol:

Link to comment
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

اخوي انت ناسي تحط

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