1. Post #1
    sk89q's Avatar
    December 2009
    362 Posts
    Still plenty of unreleased code of mine. As with the other ones I released recently, this "has not been touched in several months."

    VoiceRadio is a combination of a microphone and a radio that together can be put into a roleplay server for a "radio station host" job. Those in the line of the sight of microphone will be heard by those near a radio. Note that by default everyone can hear everyone's voice on a server, so the gamemode must first have some limitation on who can hear who.

    Both the microphone and radio can be toggled on and off. When the radio is off, no sound will be "emitted" by it. When the microphone is off, it will not pick up any voices.

    VoiceRadio is not capable of broadcasting music. It only broadcasts voice chat and music played over voice chat.

    Read the README.txt file.





    Thanks to BoJaN for writing the initial version for a request from me. I came back and updated it.
    Reply With Quote Edit / Delete Reply United States Show Events Lua King Lua King x 35Winner Winner x 3Useful Useful x 2Dumb Dumb x 1 (list)

  2. Post #2
    Grey's Avatar
    August 2010
    535 Posts
    Holy shit I love you

  3. Post #3
    Gold Member
    Doctor_Communism's Avatar
    June 2009
    2,141 Posts
    Could you make one that transmits all the sound around it and also works with text?
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 1 (list)

  4. Post #4
    Gold Member
    blown25's Avatar
    March 2009
    1,996 Posts
    cool, i give it a try

    Edited:

    here it is



    Ip: 69.197.189.17:27015

    if you wanna try it in our rp.
    Reply With Quote Edit / Delete Reply Sweden Show Events Dumb Dumb x 10 (list)

  5. Post #5
    : D
    : D's Avatar
    August 2010
    936 Posts
    Wow, dude- really useful and original! Love it.

  6. Post #6
    saszasta's Avatar
    May 2008
    38 Posts
    This + adding a connection between time spent on the mic with your salary and you get well done job.
    Reply With Quote Edit / Delete Reply Poland Show Events Agree Agree x 4 (list)

  7. Post #7
    Martinerrr's Avatar
    December 2009
    74 Posts
    Ho ho.. ho.. ho-holysnap!
    (Not trying to make an reference with hoe or anything here...)
    This is so useful man, good for mayors in DarkDM.

  8. Post #8
    sk89q's Avatar
    December 2009
    362 Posts
    Could you make one that transmits all the sound around it and also works with text?
    Transmitting all sound is not possible but the text is. Unfortunately I don't play Gmod anymore and getting the screenshot of this was hard enough, so someone else has to (and is free to) do this.

  9. Post #9
    Gold Member
    Kung Fu Jew's Avatar
    November 2006
    5,681 Posts
    This doesn't work. No errors or anything.
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 6Agree Agree x 1 (list)

  10. Post #10
    Gold Member
    Trekkie0's Avatar
    January 2006
    118 Posts
    Someone made something like this for me once. It worked almost the same way except that the microphone was not a separate piece.
    Reply With Quote Edit / Delete Reply United States Show Events Winner Winner x 1 (list)

  11. Post #11
    McMissile's Avatar
    May 2007
    463 Posts
    It would be great if this could be modified to work in sandbox too. The current problem I'm facing is that when microphones are used in Sandbox, they can be heard everywhere. If there was some sort of console command you could add to enable/disable a voice chat radius that would be absolutely fantastic. Thanks.
    Reply With Quote Edit / Delete Reply United States Show Events Disagree Disagree x 1 (list)

  12. Post #12
    sk89q's Avatar
    December 2009
    362 Posts
    This doesn't work. No errors or anything.
    Are you unable to hear the voice of someone in the microphone when near a radio?

    This is the same version that was used on an RP server I ran for a short period of time and it did work then. Of course, Gmod has seen some updates since then, so perhaps something broke.

  13. Post #13
    Gold Member
    Kung Fu Jew's Avatar
    November 2006
    5,681 Posts
    Yeah, that whole deal.

    I do have a thing allowing players to only hear each other when in a certain radius of each other.

  14. Post #14
    sk89q's Avatar
    December 2009
    362 Posts
    Is that part of the gamemode or an addon (that uses hook.Add)? If it's the latter, it's not going to work because Garry Mod's hook system doesn't support priorities so whatever hook runs first wins.

  15. Post #15
    CapsAdmin's Avatar
    August 2005
    3,934 Posts
    Didn't azuisleet add something to gmod that makes it possible to hear the voice chat come from the player?

    At least I think it was added but no one noticed or something.

  16. Post #16
    Gold Member
    thejjokerr's Avatar
    December 2007
    2,090 Posts
    Didn't azuisleet add something to gmod that makes it possible to hear the voice chat come from the player?

    At least I think it was added but no one noticed or something.
    You mean, like 3d sound? Because it says something like that on this page: http://wiki.garrysmod.com/?title=Gam...arPlayersVoice

  17. Post #17
    sk89q's Avatar
    December 2009
    362 Posts
    If you do mean 3D sound, yes he did, but you have no control over it beyond just turning it on or off, which is quite unfortunate.

  18. Post #18
    CapsAdmin's Avatar
    August 2005
    3,934 Posts
    well that sucks
    Reply With Quote Edit / Delete Reply Norway Show Events Agree Agree x 2 (list)

  19. Post #19
    Gold Member
    Kung Fu Jew's Avatar
    November 2006
    5,681 Posts
    Is that part of the gamemode or an addon (that uses hook.Add)? If it's the latter, it's not going to work because Garry Mod's hook system doesn't support priorities so whatever hook runs first wins.
    Oh. Yeah, it's an addon. You could add your own radius of being able to hear other players with this so it's compatible, though, right?

    Where do I get that 3d sound thing, then, if nobody minds me asking?
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 1 (list)

  20. Post #20
    sk89q's Avatar
    December 2009
    362 Posts
    Err, yeah, but a lot of gamemodes already support it. It would be a bit of a conflict.

  21. Post #21
    Gold Member
    Kung Fu Jew's Avatar
    November 2006
    5,681 Posts
    A separate version, then, for us sandbox players?

  22. Post #22
    sk89q's Avatar
    December 2009
    362 Posts
    Err, I don't have Gmod installed at the moment, so it doesn't seem likely.

  23. Post #23
    Gold Member
    Kung Fu Jew's Avatar
    November 2006
    5,681 Posts
    Shiiiiit
    Reply With Quote Edit / Delete Reply United States Show Events Funny Funny x 1 (list)

  24. Post #24
    McMissile's Avatar
    May 2007
    463 Posts
    Yeah if there is some sort of way to get this working on sandbox that would be awesome.

  25. Post #25
    cool, i give it a try

    Edited:

    here it is



    Ip: 69.197.189.17:27015

    if you wanna try it in our rp.
    The texturess....
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Agree Agree x 1Zing Zing x 1 (list)

  26. Post #26
    Gold Member
    Mr.T's Avatar
    August 2010
    2,691 Posts
    I have always wanted something like this

  27. Post #27
    Diet Taco's Avatar
    February 2010
    204 Posts
    Thank god! I've been trying to make something like this for ages!
    I have a question though, can this be used on gamemodes other than DarkRP?

    Thanks for a wonderful release!

    Edited:

    Also, how does it work if there are multiple microphones, with multiple people hosting? Could you somehow implement a way to have different channels that people may choose from their personal radio? And the host would set their channel, for people to join and listen to him/her.

  28. Post #28
    sk89q's Avatar
    December 2009
    362 Posts
    It can be used on any gamemode, provided the requirement I mentioned is met (chat radius or whatever implemented as part of the gamemode).

    The underlying library supports different channels, but the radio entity itself does not.

    I am not working on this anymore, so it falls on you if you want to add more features.

  29. Post #29
    Gold Banana
    Banana Lord.'s Avatar
    May 2010
    6,526 Posts
    I'm having an issue with the Microphone model...

    it's on FastDL, and I even re-named everything to lower-case/updated the resource.AddFile...any ideas?

    Edited:

    Error: KeyValues Error: RecursiveLoadFromBuffer: got EOF instead of keyname in file models/mic.mdl
    mdlkeyvalue, (*prop_data*),

  30. Post #30
    freakypred's Avatar
    January 2007
    105 Posts
    Isn't there a way to transmit the speech of an NPC from one point of the map to another? Like how Breen's broadcasting works in the first part of Half-Life 2

  31. Post #31
    Jvs
    PENISCorp's First Employee
    Jvs's Avatar
    June 2009
    1,568 Posts
    Isn't there a way to transmit the speech of an NPC from one point of the map to another? Like how Breen's broadcasting works in the first part of Half-Life 2
    With an env_microphone and an env_speaker,yes.

  32. Post #32
    RCT3Manie's Avatar
    April 2010
    37 Posts
    Ey there, I love the Voice Radio BUT....
    I have a problem with FPP.
    I cant wire the Mic. I was building a studio and want to wire the OnAir on the mic to a chip. But i cant wire "World Props". Can someone help me!!! Thx

    RTC3Manie
    Reply With Quote Edit / Delete Reply Netherlands Show Events Funny Funny x 3 (list)

  33. Post #33
    RCT3Manie's Avatar
    April 2010
    37 Posts
    Come on guys! This is serous! Please help me!
    Reply With Quote Edit / Delete Reply Netherlands Show Events Funny Funny x 4 (list)

  34. Post #34

    August 2009
    87 Posts
    The model for my Microphone isn't working :( I can't figure out why, can anyone help?
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Dumb Dumb x 2Agree Agree x 1 (list)

  35. Post #35

    January 2012
    10 Posts
    How to modify DarkRP to delete microphones when you change job ? please help :)
    Reply With Quote Edit / Delete Reply Windows 7 Denmark Show Events Dumb Dumb x 1Agree Agree x 1 (list)

  36. Post #36
    Hi, I'm 14. Don't laugh though, or I'll pretend to sue you. My uncle is the most famous lawyer in San Fransisco!! Also, my RP server is uber 1337, join it. If you complain though, I'll ban you. xD btw thank Pyth for this title

    October 2011
    33 Posts
    Yea, can anyone please help me edit the DarkRP to remove the microphones?
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Dumb Dumb x 3Agree Agree x 1Funny Funny x 1Informative Informative x 1 (list)

  37. Post #37
    CyberGmod Founder PropHuntv2 Home
    Phoenixf129's Avatar
    May 2009
    940 Posts
    The model for my Microphone isn't working :( I can't figure out why, can anyone help?
    Install it properly.

    How to modify DarkRP to delete microphones when you change job ? please help :)
    lua/autorun/server/removemics.lua

    
    hook.Add("Think", "gtfomicrophones", function()
    local found
    
    for _, ply in pairs(player.GetAll()) do
    if ply:Team() == "TEAM_RADIOOP" then
    found = true
    end
    end
    
    if found then return end
    
    for k, v in pairs(ents.GetAll()) do
    if v:GetClass() == "microphone" then
    v:Remove()
    end
    end
    
    end)

    Yea, can anyone please help me edit the DarkRP to remove the microphones?
    Above.


    Now stop bumping a dead thread.
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Lua Helper Lua Helper x 1 (list)

  38. Post #38
    Get your own DarkRP Server!
    FPtje's Avatar
    January 2006
    5,591 Posts
    Install it properly.



    lua/autorun/server/removemics.lua


    hook.Add("Think", "gtfomicrophones", function()local foundfor _, ply in pairs(player.GetAll()) doif ply:Team() == "TEAM_RADIOOP" thenfound = trueendendif found then return endfor k, v in pairs(ents.GetAll()) doif v:GetClass() == "microphone" thenv:Remove()endendend)
    That's both wrong AND the most inefficient way to do it.
    ply:Team() always returns an integer. Comparing it to a string will always return false.


    Try this:

    hook.Add("OnPlayerChangedTeam", "RemoveMicrophones", function(ply, oldteam, newteam)
    	for k, v in pairs(player.GetAll()) do
    		if v:Team() == TEAM_RADIOOP then -- Assuming the team is TEAM_RADIOOP
    			return
    		end
    	end
    
    	for k,v in pairs(ents.FindByClass("microphone")) do
    		SafeRemoveEntity(v)
    	end
    end)

    Edited:

    Now stop bumping a dead thread.
    One of my favourite servers is running this mod. It still works, it's still good and therefore the thread for it is not dead.
    Reply With Quote Edit / Delete Reply Linux Netherlands Show Events Lua King Lua King x 1Friendly Friendly x 1Lua Helper Lua Helper x 1 (list)

  39. Post #39
    itkuitkzhji's Avatar
    April 2012
    92 Posts
    Please can someone update this addon to make it work with Garrys Mod 13? I tried it myself until this error appeared in the console:

    Code:
    [ERROR] gamemodes/darkrp/gamemode/server/main.lua:824: attempt to index field 'dt' (a nil value)
      1. callback - gamemodes/darkrp/gamemode/server/main.lua:824
       2. RP_PlayerChat - gamemodes/darkrp/gamemode/server/chat.lua:20
        3. unknown - gamemodes/darkrp/gamemode/server/chat.lua:63
    Uploaded it for justice: http://www.mediafire.com/?ithklqhom4llraj

    Edit.: Alright. I just forgot to rename info.txt -_-

  40. Post #40
    itkuitkzhji's Avatar
    April 2012
    92 Posts
    I like to know if someone would be interested in converting this addon to GM13. According to mediafire there were 9 people already who downloaded it. And yes, of course I tried to fix it myself, but I'm not that experienced in GMod/lua.

    This error appears when you try to spawn a radio:

    Code:
    Couldn't include file 'includes\modules\voicechannel.lua' (File not found) (@addons/voiceradio/lua/autorun/radio_init.lua (line 20))
    So I did a little bit of a research and found this interesting article: http://wiki.garrysmod.com/page/Lua/T...ting_Libraries

    It was telling me to move the "voicechannel" module from

    ...\garrysmod\addons\voiceradio\lua\includes\modul es\voicechannel.lua

    to

    ...\garrysmod\lua\includes\modules\voicechannel.lu a

    Unfortunately I'm still getting the same error as before. Hopefully someone can take a look into this. It's a really nice addon.
    Reply With Quote Edit / Delete Reply Windows 7 Germany Show Events Agree Agree x 2Dumb Dumb x 1 (list)