Here you go:
GUIEditor = {
button = {},
window = {}
}
GUIEditor.window[1] = guiCreateWindow(495, 299, 522, 358, "Songs panel", false)
guiWindowSetSizable(GUIEditor.window[1], false)
GUIEditor.button[1] = guiCreateButton(12, 38, 198, 69, "SONG1", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[1], "clear-normal")
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFF90522")
GUIEditor.button[2] = guiCreateButton(278, 9, 201, 27, "", false, GUIEditor.button[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[3] = guiCreateButton(3, 126, 162, 16, "", false, GUIEditor.button[1])
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[4] = guiCreateButton(330, 42, 176, 65, "SONG2", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FF1FF409")
GUIEditor.button[5] = guiCreateButton(18, 156, 192, 71, "SONG3", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FF0622F6")
GUIEditor.button[6] = guiCreateButton(334, 160, 172, 67, "SONG4", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFF803EF")
GUIEditor.button[7] = guiCreateButton(23, 290, 197, 58, "Stop", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[7], "sa-header")
guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[8] = guiCreateButton(338, 286, 168, 62, "Close", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[8], "sa-header")
guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFAAAAAA")
function songo()
guiSetVisible ( GUIEditor.window[1], true )
end
bindKey("F7","down",songo)
function Close()
guiSetVisible(GUIEditor.window[1], false)
end
addEventHandler("onClientGUIClick", GUIEditor.button[8],Close, false)
addEventHandler("onClientGUIClick", root,
function ()
if ( source == GUIEditor.button[1] ) then
if isElement(sound3) then destroyElement(sound3) end
if isElement(sound2) then destroyElement(sound2) end
if isElement(sound4) then destroyElement(sound4) end
if isElement(sound1) then destroyElement(sound1) end
sound1 = playSound( "song1.mp3", false )
elseif ( source == GUIEditor.button[4] ) then
if isElement(sound3) then destroyElement(sound3) end
if isElement(sound1) then destroyElement(sound1) end
if isElement(sound4) then destroyElement(sound4) end
if isElement(sound2) then destroyElement(sound2) end
sound2 = playSound( "song2.mp3", false )
elseif ( source == GUIEditor.button[5] ) then
if isElement(sound1) then destroyElement(sound1) end
if isElement(sound2) then destroyElement(sound2) end
if isElement(sound4) then destroyElement(sound4) end
if isElement(sound3) then destroyElement(sound3) end
sound3 = playSound( "song3.mp3", false )
elseif ( source == GUIEditor.button[6] ) then
if isElement(sound1) then destroyElement(sound1) end
if isElement(sound2) then destroyElement(sound2) end
if isElement(sound3) then destroyElement(sound3) end
if isElement(sound4) then destroyElement(sound4) end
sound4 = playSound( "song4.mp3", false )
elseif ( source == GUIEditor.button[7] ) then
if isElement(sound1) then destroyElement(sound1) end
if isElement(sound2) then destroyElement(sound2) end
if isElement(sound3) then destroyElement(sound3) end
if isElement(sound4) then destroyElement(sound4) end
end
end
)