Hello to all!
I call on to you today because I need help lua there. I have at present more than 22 000 subscribers on one of my addons to prefer, which is this one: http://steamcommunity.com/sharedfiles/filedetails/?id=132829658&tscn=1456603701
However, I meet a major problem for me and my community … In the version 2.0 of my radio, the musics were played when the used player affects action by looking at this one, then at sounds to play it naturally in a precise order but without being able to see the title even not changing exactly a music or still settling the volume.
I then decided in my new version on 3.0, to create an interface for the users with different categories, possibility of settling the volume as well as of changing exactly the titles. I added to this secondary sound effects.
You will tell me then: “yeah it is great then! It is what the problem?”
The major problem is that in the version 2.0 sounds go out directly of the entity itself and the players too much far from the radio heard then no sound, which is realistic. When a player throw a music people around the radio hear the musics which was to play, yet since 3.0 there are no more the features …
I show you then an example of my cl_init.lua what could can be you give an idea to help me, thank you again to you for the answers which shall bring to you to me, good or bad.
Here is the button which activates a precise music:
local DermaButton2 = vgui.Create( "DButton", panel1 ) DermaButton2:SetText( "I don't want to set the world on fire" ) DermaButton2:SetFont( "Next2" ) DermaButton2:SetColor( Color ( 0, 161, 255, 255 )) DermaButton2:SetSize( 10 ) DermaButton2:SetPos( 5, 25 ) DermaButton2:SetSize( 565, 20 ) DermaButton2.DoClick = function () RunConsoleCommand( "stopsound" ) timer.Simple( 0.1, function () EmitSound( Sound( "sound/fallout_3/02.i_don't_want_to_set_the_world_on_fire.mp3" ), Entity( 1 ):GetPos(), 1, CHAN_AUTO, 1, 75, 0, 100 ) end ) timer.Simple( 0.1, function () EmitSound( Sound( "sound/Radio_select.wav" ), Entity ( 1 ):GetPos(), 1, CHAN_AUTO, 1, 75, 0, 100 ) end ) Entity( 1 ):PrintMessage ( HUD_PRINTTALK, "Music started" ) end
Thanks to you and do not hesitate to ask me for additional information to understand my problems!