GUIEditor.window[1] = guiCreateWindow(282, 130, 236, 396, "Window", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 1.00)
GUIEditor.button[1] = guiCreateButton(9, 345, 217, 37, "Stop / آيقاف", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[2] = guiCreateButton(9, 308, 217, 37, "Start / تشغيل", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")
elementlist = guiCreateGridList(9, 19, 217, 285, false, GUIEditor.window[1])
guiGridListAddColumn(elementlist, "#", 0.9)
-- Sound's
songs = {
{"Sound","http://cdn.top4top.net/d_11668d4a9b1.mp3"},
}
for _,song in ipairs(songs) do
row = guiGridListAddRow(elementlist)
guiGridListSetItemText(elementlist,row,1,song[1],false,false)
guiGridListSetItemData(elementlist,row,1,song[2])
end
-- Start \ Sound
addEventHandler( "onClientGUIClick", resourceRoot, function ( )
if ( source == GUIEditor.button[2] ) then
if ( guiGridListGetSelectedItem ( elementlist ) ~= -1 ) then
local statioURL = guiGridListGetItemData ( elementlist, guiGridListGetSelectedItem ( elementlist ), 1 )
if ( statioURL ~= "" ) then
if ( isElement ( SoundURL ) ) then destroyElement ( SoundURL ) end
SoundURL = playSound ( stationURL )
end
end
elseif ( source == GUIEditor.button[1] )then
if ( isElement ( SoundURL ) ) then
destroyElement ( SoundURL )
end
end
end )