AliAlanzi Posted February 25, 2017 Share Posted February 25, 2017 local groupName = '[ARMY]' -- اسم القروب -------------------- RadioMarkerBASE1 = createMarker( 191.73413, 1903.36255, 17.64063-1, "cylinder", 1.5, 150, 0, 150, 255) setElementInterior ( RadioMarkerBASE1, 0 ) setElementDimension ( RadioMarkerBASE1, 0 ) Window_Radio = guiCreateWindow(271, 144, 342, 453, "Radio", false) guiSetVisible(Window_Radio, false) guiWindowSetSizable(Window_Radio, false) button_Play = guiCreateButton(40, 386, 61, 34, "Play", false, Window_Radio) button_Stop = guiCreateButton(127, 386, 61, 34, "Stop", false, Window_Radio) button_Close_Radio = guiCreateButton(290, 406, 33, 29, "x", false, Window_Radio) songGridList = guiCreateGridList(28, 38, 293, 324, false, Window_Radio) guiGridListSetSelectionMode(songGridList,0) songColumn = guiGridListAddColumn(songGridList,"Artist - Title",0.8) songs = { {"طني ورور","http://alshira3.com/uploads/songs/gmylh_6ny_wrwr.mp3"}, {"وديع - قمر زمان","http://www.s1.bagdady.com/songs/ferqat-alorans/garatak-aldenya.mp3"}, {"جورج وسوف - كلامك يأ حبيبي","http://www.al7an.org/songs/mp3/arabic/2008/goerge-wassof-klamk-ya-7bebe/gorg_wassof_kalamak_ya_habeby.mp3"}, {"رابح صقر - شفت الحياه","http://alshira3.com/uploads/songs/shft_al7yah.mp3"}, {"زايد الصالح - ذهب ذهب ","http://alshira3.com/uploads/songs/dhb_dhb.mp3"}, {"زايد الصالح - حكم المؤبد","http://alshira3.com/uploads/songs/7km_aloabd.mp3"}, {"جورج وسوف - ادي الكانو","http://www.al7an.org/songs/mp3/arabic/2008/goerge-wassof-klamk-ya-7bebe/gorg_wassof_ady_elly_kano.mp3"}, {"زايد الصالح - شسويله عشان يحبني","http://www.alshira3.com/songs/zayd-alsalh/17.mp3"}, {"زايد الصالح - سويت فيا","http://alshira3.com/uploads/songs/swyt_fya.mp3"}, {"زايد الصالح - اه من الدنيا","http://alshira3.com/uploads/songs/ah_mn_aldnya.mp3"}, {"زايد الصالح - حبيبي نساني","http://alshira3.com/uploads/songs/7byby_nsany.mp3"}, {"هيفا وهبي -واوا","http://www.al7an.org/songs/mp3/arabic/2010/Hayfa_Wehby_Baby/Haifa_Wehbi-05.El_Wawaa.mp3"}, {"Inna - Sexy Wild","http://www.woo55.pk/adata/741/Inna%20-%20Crazy%20Sexy%20Wild%20(www.SongsLover.Pk).mp3"}, {"Akon - chammak challo","http://brit-asian.com/wp-content/uploads/2011/05/Ra-One-Chamak-Challo-Akon.mp3"}, {"Pitbull - Give Me Everything","http://a.tumblr.com/tumblr_lm8dlxNmwl1qck53eo1.mp3"}, {"PSV-Gangm","http://www.al7an.org/songs/mp3/desco/02.mp3"}, } for i,v in ipairs (songs) do local row = guiGridListAddRow (songGridList) guiGridListSetItemText (songGridList, row, 1, tostring(v[1]), false, true) guiGridListSetItemData (songGridList, row, 1, tostring(v[2])) end function CloseTheGui() guiSetVisible(Window_Radio, false) showCursor(false) end addEventHandler("onClientPlayerWasted", getLocalPlayer(), CloseTheGui) addEventHandler("onClientGUIClick", button_Close_Radio, CloseTheGui, false) function PlayRadio() SongFileB = guiGridListGetItemData(songGridList, guiGridListGetSelectedItem (songGridList), 1) local scheck = guiGridListGetItemText(songGridList, guiGridListGetSelectedItem ( songGridList ), 1) outputChatBox(scheck,255, 255, 0, true ) if scheck then local stationName = guiGridListGetItemText (songGridList, scheck, songColumn) if stationName then triggerServerEvent("SetSongBASE2", localPlayer, SongFileB) else outputChatBox("unknown error") end end end addEventHandler("onClientGUIClick", button_Play, PlayRadio, false) addEvent("StartSongBASE2", true) addEventHandler("StartSongBASE2", root, function(link) if isElement(soundBASE1) then stopSound(soundBASE1) end if not link then return end CloseTheGui() soundBASE1 = playSound3D(link, 191.73413, 1903.36255, 17.64063, true) setElementInterior ( soundBASE1, 0 ) setElementDimension ( soundBASE1, 0 ) setSoundVolume(soundBASE1, 2) setSoundMaxDistance(soundBASE1, 250) end) function SongPlaying (hitPlayer) if getElementType(hitPlayer) == "vehicle" or getElementType(hitPlayer) == "marker" or hitPlayer ~= localPlayer then return end local theGroup = getElementData (hitPlayer , "Group" ) if theGroup == groupName then if isElement(soundBASE1) then stopSound(soundBASE1) end guiSetVisible(Window_Radio, true) showCursor(true) else outputChatBox("group "..groupName.." only",255, 0, 255, true ) end end addEventHandler ("onClientMarkerHit", RadioMarkerBASE1,SongPlaying) function StopRadio() if isElement(soundBASE1) then stopSound(soundBASE1) end triggerServerEvent("SetSongBASE2", localPlayer, false) end addEventHandler("onClientGUIClick", button_Stop, StopRadio, false) كل شي يشتغل بس لمن ادعس play ما يجي صوت ليش Link to comment
!#NssoR_) Posted February 25, 2017 Share Posted February 25, 2017 يرجي التكمله في موضوعك السابق ..!! يغلق.# Link to comment
Recommended Posts