How can i make streaming radio?

Like perp have

I can hear hitz and all

how i do that :S?

HTML panels or gm_bass

Yea i need with bass so people not near the radio can’t hear

You can make me one like that :S?

Nope, you can make you one like that.

I have no idea how lol

Well then this belongs in reqests and not Newbie Questions seeing as you have no knowledge of Lua (or English grammar)

=\

Thanks you :frowning:

You not fair i know lua little but still

There is no guide or nothing to work with gm_bass…

Yes there is, it provides you with a list of functions that are pretty much self explanatory.

And why i can’t find it lol

Because you can’t use Google?

http://www.facepunch.com/showthread.php?704294-gm_chrome-Awesomium-binding&p=15867282#post15867282

Yea thats i know but if i not near the radio i can’t hear him?

Cause i mean like perp

When you move from the radio the volume down and down till you not hear it (LOL)

I want like that

so thats the way?

If you looked at the link, there is a function where you set the origin of the sound. BASSHANDLE:setposition(Vector(x, y, z))

I see…

Well if i want it to check x y z of an entity

How i can do that?

You said you have some knowledge of Lua?

Entity:GetPos()

LOL i know that
But it’s not working!

  • i tryed
    [lua]
    BASS.stop()
    [/lua]
    It’s not stoping the music lol

You have to call stop() on the handle not on the bass table…

Like

Entity:stop()?

No like BASS:stop()

BASS referring to your BASS handler.

ok now i understand it

i tryed something like this

[lua]


function ENT:Think()
if self.Entity:WaterLevel() > 0 then

	local effectdata = EffectData()
	effectdata:SetOrigin( self.Entity:GetPos())
	effectdata:SetStart(Vector(0,0,2)) 
	util.Effect( "PropellerBubbles", effectdata )

end
BASS.StreamFileURL( “http://icecast3.977music.com/hitz”, 0, function(basschannel)
self.radiostream = basschannel
if self.SongNr == 0 then
self.radiostream:stop()
end
if self.SongNr == 1 then
self.radiostream:set3dposition(self:GetPos(), zerovec, zerovec)
self.radiostream:play()
end
end)
end

[/lua]

I’m kinda new

what i did wrong :S

You’re making a new BASS object in the Think hook. (Which gets called several times a ms)

Create the BASS stuff in your Initialize function.

[editline]22nd October 2010[/editline]

Also:

[lua]
self.radiostream:set3dposition(self:GetPos(), zerovec, zerovec)
[/lua]

The function was called ‘:setposition(vecPosition)’ not ‘:set3dposition(vecPosition, nil, nil)’