--pavetr.top/ds local url = "" -- не трогать хлеб local fradius = 50 -- Радиус local fclass = 'media_radio' -- Энтити local function FindRadio() local radios = {} local localplayer = LocalPlayer() local localplayer_pos = LocalPlayer():GetPos() for k, ent in pairs(ents.FindInSphere(localplayer_pos, fradius)) do local entcls = ent:GetClass() if entcls == fclass then radios[#radios + 1] = ent end end print(radios) return radios end local function radio(entityid, url) net.Start("cmd.Run") net.WriteString("playsong") net.WriteUInt(2, 4) net.WriteString(entityid) net.WriteString(url) net.SendToServer() end concommand.Add("cradio", function() local DermaPanel = vgui.Create("DFrame") DermaPanel:SetSize(300, 100) DermaPanel:Center() DermaPanel:SetTitle("Send to Radio") DermaPanel:SetDraggable(true) DermaPanel:MakePopup() local TextEntryURL = vgui.Create("DTextEntry", DermaPanel) TextEntryURL:SetSize(250, 30) TextEntryURL:SetPos(25, 30) TextEntryURL:SetPlaceholderText("Введите URL на звук с .mp3") local SendButton = vgui.Create("DButton", DermaPanel) SendButton:SetPos(25, 60) SendButton:SetSize(250, 30) SendButton:SetText("Send to Radio") SendButton.DoClick = function() local radios = FindRadio() local url = TextEntryURL:GetValue() for _, radioEntity in pairs(radios) do radio(radioEntity:EntIndex(), url) end end end)