اخوان سويت مود أغاني عند الضغط علي زر في ماركر معين وأشتغل الحمدلله بس عملتله destroyElement
عشان ما حدا يستهبل كل شوي ويغير أغنية وفعلاً بعد الضعط علي الزر يختفي الماركر بس ما يرجع مع أني عامله تايمر والأغنية تفضل تتعاد
كيف أخلي الماركر يرجع بعد وقت وأخلي الأغنية لا تتعاد
وهاد الكود
GUIEditor = {
tab = {},
tabpanel = {},
button = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
wnd = guiCreateWindow(199, 0, 454, 551, "Songs -=¦|BY|¦=- ZoaxEr", false)
guiWindowSetSizable(wnd, false)
guiSetVisible(wnd, false)
GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 56, 436, 480, false, wnd)
GUIEditor.tab[1] = guiCreateTab("عربي", GUIEditor.tabpanel[1])
GUIEditor.button[1] = guiCreateButton(10, 14, 408, 42, "مــــــــــــــــــــــــــــــــــــــش هــــــــــروح", false, GUIEditor.tab[1])
guiSetFont(GUIEditor.button[1], "default-bold-small")
GUIEditor.button[2] = guiCreateButton(10, 72, 408, 42, "حــــــــــــــــــــــــــــــــــــــــــــــــلاوة روحــــ", false, GUIEditor.tab[1])
GUIEditor.button[3] = guiCreateButton(10, 134, 408, 42, "الجـــــــــــــــوكـــــــــر بــعـد الديــــمو", false, GUIEditor.tab[1])
GUIEditor.button[4] = guiCreateButton(10, 194, 408, 42, "أســـــــــــــــــــــــــــــــــــــلام فـــانـتـا", false, GUIEditor.tab[1])
GUIEditor.button[5] = guiCreateButton(10, 253, 408, 42, "لــــــــــعبة الرجولـــــــــــــــــيــــــــــــــــــــــــــــــــــة", false, GUIEditor.tab[1])
GUIEditor.button[6] = guiCreateButton(10, 314, 408, 42, "أنـــــــــا أصــــــــــــــلاً جــــن", false, GUIEditor.tab[1])
GUIEditor.button[7] = guiCreateButton(10, 375, 408, 42, "كــــــــــــــــلــــــــــــــــــــــه يــــــســــــــــكت", false, GUIEditor.tab[1])
GUIEditor.tab[2] = guiCreateTab("أجنبي", GUIEditor.tabpanel[1])
GUIEditor.button[8] = guiCreateButton(5, 6, 425, 44, "Jai Ho", false, GUIEditor.tab[2])
guiSetFont(GUIEditor.button[8], "sa-header")
GUIEditor.button[9] = guiCreateButton(5, 66, 425, 44, "Best Song", false, GUIEditor.tab[2])
guiSetFont(GUIEditor.button[9], "sa-header")
GUIEditor.button[10] = guiCreateButton(5, 126, 425, 44, "Gangam Style", false, GUIEditor.tab[2])
guiSetFont(GUIEditor.button[10], "sa-header")
GUIEditor.button[11] = guiCreateButton(5, 188, 425, 44, "So Lena", false, GUIEditor.tab[2])
guiSetFont(GUIEditor.button[11], "sa-header")
GUIEditor.button[12] = guiCreateButton(5, 251, 425, 44, "Reason", false, GUIEditor.tab[2])
guiSetFont(GUIEditor.button[12], "sa-header")
GUIEditor.button[13] = guiCreateButton(5, 317, 425, 44, "I know", false, GUIEditor.tab[2])
guiSetFont(GUIEditor.button[13], "sa-header")
GUIEditor.button[14] = guiCreateButton(5, 378, 425, 44, "Rap", false, GUIEditor.tab[2])
guiSetFont(GUIEditor.button[14], "sa-header")
GUIEditor.button[15] = guiCreateButton(282, 28, 162, 43, "Close", false, wnd)
guiSetFont(GUIEditor.button[15], "sa-header")
end
)
marker = createMarker(800.900390625,-2096.2998046875,12.199999809265,"cylinder",1.5,245,92,9,255)
addEventHandler('onClientMarkerHit', marker,
function ( hitPlayer )
if ( hitPlayer == localPlayer ) then
guiSetVisible (wnd, true )
showCursor( true )
end
end
)
addEventHandler ("onClientGUIClick", getRootElement(), function ( )
if ( source == GUIEditor.button[15] ) then
guiSetVisible ( wnd , false)
showCursor ( false )
elseif ( source == GUIEditor.button[1] ) then
desusound = playSound3D("go.mp3", 800.900390625, -2096.2998046875, 12.199999809265, true)
setSoundVolume(desusound,1.-- s8) -->
setSoundMaxDistance(desusound, 200)
destroyElement
setTimer ( function ( ) createMarker(800.900390625,-2096.2998046875,12.199999809265,"cylinder",1.5,245,92,9,255) end ,10000, 1,)
elseif ( source == GUIEditor.button[2] ) then
desusound = playSound3D("halawa.mp3", 800.900390625, -2096.2998046875, 12.199999809265, true)
setSoundVolume(desusound,1.-- s8) -->
setSoundMaxDistance(desusound, 200)
destroyElement
setTimer ( function ( ) createMarker(800.900390625,-2096.2998046875,12.199999809265,"cylinder",1.5,245,92,9,255) end ,10000, 1,)
elseif ( source == GUIEditor.button[3] ) then
desusound = playSound3D("Joker.mp3", 800.900390625, -2096.2998046875, 12.199999809265, true)
setSoundVolume(desusound,1.-- s8) -->
setSoundMaxDistance(desusound, 200)
destroyElement
setTimer ( function ( ) createMarker(800.900390625,-2096.2998046875,12.199999809265,"cylinder",1.5,245,92,9,255) end ,10000, 1,)
elseif ( source == GUIEditor.button[4] ) then
desusound = playSound3D("Night.mp3", 800.900390625, -2096.2998046875, 12.199999809265, true)
setSoundVolume(desusound,1.-- s8) -->
setSoundMaxDistance(desusound, 200)
destroyElement
setTimer ( function ( ) createMarker(800.900390625,-2096.2998046875,12.199999809265,"cylinder",1.5,245,92,9,255) end ,10000, 1,)
elseif ( source == GUIEditor.button[5] ) then
desusound = playSound3D("men.mp3", 800.900390625, -2096.2998046875, 12.199999809265, true)
setSoundVolume(desusound,1.-- s8) -->
setSoundMaxDistance(desusound, 200)
destroyElement
setTimer ( function ( ) createMarker(800.900390625,-2096.2998046875,12.199999809265,"cylinder",1.5,245,92,9,255) end ,10000, 1,)
elseif ( source == GUIEditor.button[6] ) then
desusound = playSound3D("Ghost.mp3", 800.900390625, -2096.2998046875, 12.199999809265, true)
setSoundVolume(desusound,1.-- s8) -->
setSoundMaxDistance(desusound, 200)
destroyElement
setTimer ( function ( ) createMarker(800.900390625,-2096.2998046875,12.199999809265,"cylinder",1.5,245,92,9,255) end ,10000, 1,)
elseif ( source == GUIEditor.button[7] ) then
desusound = playSound3D("shut_up.mp3", 800.900390625, -2096.2998046875, 12.199999809265, true)
setSoundVolume(desusound,1.-- s8) -->
setSoundMaxDistance(desusound, 200)
destroyElement
setTimer ( function ( ) createMarker(800.900390625,-2096.2998046875,12.199999809265,"cylinder",1.5,245,92,9,255) end ,10000, 1,)
elseif ( source == GUIEditor.button[8] ) then
desusound = playSound3D("Jai_Ho.mp3", 800.900390625, -2096.2998046875, 12.199999809265, true)
setSoundVolume(desusound,1.-- s8) -->
setSoundMaxDistance(desusound, 200)
destroyElement
setTimer ( function ( ) createMarker(800.900390625,-2096.2998046875,12.199999809265,"cylinder",1.5,245,92,9,255) end ,10000, 1,)
elseif ( source == GUIEditor.button[9] ) then
desusound = playSound3D("Best_Song.mp3", 800.900390625, -2096.2998046875, 12.199999809265, true)
setSoundVolume(desusound,1.-- s8) -->
setSoundMaxDistance(desusound, 200)
destroyElement
setTimer ( function ( ) createMarker(800.900390625,-2096.2998046875,12.199999809265,"cylinder",1.5,245,92,9,255) end ,10000, 1,)
elseif ( source == GUIEditor.button[10] ) then
desusound = playSound3D("gagnam_style.mp3", 800.900390625, -2096.2998046875, 12.199999809265, true)
setSoundVolume(desusound,1.-- s8) -->
setSoundMaxDistance(desusound, 200)
destroyElement
setTimer ( function ( ) createMarker(800.900390625,-2096.2998046875,12.199999809265,"cylinder",1.5,245,92,9,255) end ,10000, 1,)
elseif ( source == GUIEditor.button[11] ) then
desusound = playSound3D("so_lena.mp3", 800.900390625, -2096.2998046875, 12.199999809265, true)
setSoundVolume(desusound,1.-- s8) -->
setSoundMaxDistance(desusound, 200)
destroyElement
setTimer ( function ( ) createMarker(800.900390625,-2096.2998046875,12.199999809265,"cylinder",1.5,245,92,9,255) end ,10000, 1,)
elseif ( source == GUIEditor.button[12] ) then
desusound = playSound3D("Reason.mp3", 800.900390625, -2096.2998046875, 12.199999809265, true)
setSoundVolume(desusound,1.-- s8) -->
setSoundMaxDistance(desusound, 200)
destroyElement
setTimer ( function ( ) createMarker(800.900390625,-2096.2998046875,12.199999809265,"cylinder",1.5,245,92,9,255) end ,10000, 1,)
elseif ( source == GUIEditor.button[13] ) then
desusound = playSound3D("I_Know.mp3", 800.900390625, -2096.2998046875, 12.199999809265, true)
setSoundVolume(desusound,1.-- s8) -->
setSoundMaxDistance(desusound, 200)
destroyElement
setTimer ( function ( ) createMarker(800.900390625,-2096.2998046875,12.199999809265,"cylinder",1.5,245,92,9,255) end ,10000, 1,)
elseif ( source == GUIEditor.button[12] ) then
desusound = playSound3D("RAP.mp3", 800.900390625, -2096.2998046875, 12.199999809265, true)
setSoundVolume(desusound,1.-- s8) -->
setSoundMaxDistance(desusound, 200)
destroyElement
setTimer ( function ( ) createMarker(800.900390625,-2096.2998046875,12.199999809265,"cylinder",1.5,245,92,9,255) end ,10000, 1,)
end
end)