1. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

Release Police Radio

Discussion in 'DarkRP Addon & Plugin Releases' started by LordiAnders, Mar 12, 2014.

  1. AustinH

    AustinH Member

    The code, It says add any job to be able to use the radio.
     
  2. LordiAnders

    LordiAnders Active Member

    Yeah, but many people want multiple channels. Such as gangsters and thieves being able to hear each other, and cops or medics and firemen having their own channels as well, and only being able to chat with one another, and not other jobs who are not a member of the channel
     
  3. AustinH

    AustinH Member

    Ahh so like a changeable frequency system?
     
  4. LordiAnders

    LordiAnders Active Member

    For example, here's 3 different channels/radios/whatever with some specific jobs added to them:
    Baddies - Thief, Gangster, Mob boss
    Cops - Police, Chief, mayor, Swat
    Mystery men - Aod, mod, owner

    So for example, if you were in a job that is part of the baddies, you could hear and talk with players with jobs who are also part of baddies, but not jobs that are part of cops or mystery men.
    And cops not being able to commune with baddies or mystery men, and so on
     
  5. Wolfy_

    Wolfy_ New Member

    I love this addon! However, could you please add a mute radio button or command? It get's very hard to roleplay when people are having conversations over the mic! A bit like the, 'Police_Radio_Only_If_On =false' but a clientside toggle, suych as ALT+R. Many thanks!
     
  6. LordiAnders

    LordiAnders Active Member

    Made an update, this is primarily optimizations

    -Screen resolutions are now cached, instead of constantly calling it
    -Got rid of table.HasValue, and replaced it with a much more efficient method
    -Materials and textures now gets cached instead of being constantly called
    -The config file has changed structure, this is primarily to make the table.HasValue change work (See "Allow_Teams")

    You will need to change your config file, and merge your old settings with the new structure!!

    Also made some new icons, however, these are seperately packaged
    There's 3 versions of the icon, one with a small outline, one with a thicker outline, and one with reduced size (might look nicer ingame)
     
    Last edited: Sep 14, 2015
    _AMD_ likes this.
  7. burger97979

    burger97979 New Member

    To anybody having errors with the fastDL

    1. Go to your lua/autorun/server
    2. Create a lua file and open it
    3. Put resource.AddSingleFile("path")
    4. Replace the path with the path to your .png files that were given in the addon.
    Here's my lua file
    Code (Text):
    resource.AddSingleFile("materials/vgui/lordi/darkrp/police_radio_off.png")
    resource.AddSingleFile("materials/vgui/lordi/darkrp/police_radio_on.png")
    resource.AddSingleFile("materials/vgui/lordi/darkrp/polis_radio_off.png")
    resource.AddSingleFile("materials/vgui/lordi/darkrp/polis_radio_on.png")
    resource.AddSingleFile("materials/vgui/lordi/darkrp/polis_radio_on_lo.png")
    resource.AddSingleFile("materials/vgui/lordi/darkrp/polis_radio_on_los.png")
    resource.AddSingleFile("materials/vgui/lordi/darkrp/polis_radio_off_lo.png")
    resource.AddSingleFile("materials/vgui/lordi/darkrp/polis_radio_off_los.png")
    --- Double Post Merged, Nov 27, 2015 ---
    Is there a way to make it so that we can make entire ULX groups have this? Instead of just jobs?
    I configured it a little bit to make people in "Admin on Duty" be able to communicate but would like for all the people in ULX groups admin, mod, and superadmin to be able to, so they can administrate better.

    That would be really cool.
     
    Last edited: Nov 27, 2015
  8. Logic

    Logic New Member

    For anyone wanting to get rid of the textures, simply use this in your garrysmod/addons/darkrpmodificationaddon/lua/police_radio/sh_p_radio_config.lua:


    Towards the bottom you should see something like this:

    Code (Text):
    Police_Radio_Config["HUD_Enable"] = true --Set to true to enable the HUD icons
    Police_Radio_Config["HUD_Use_Textures"] = false --If enabled. The HUD will use texture files (vtf) instead of a png file
    Police_Radio_Config["HUD_Texture_On"] = "vgui/lordi/darkrp/police_radio_on" --If enabled. The HUD will use texture files (vtf) instead of a png file
    Police_Radio_Config["HUD_Texture_Off"] = "vgui/lordi/darkrp/police_radio_off" --Texture that appears if the radio is currently off
    --******* ^^ These settings will affect your download! *******
    Simply change it to this:

    Code (Text):
    Police_Radio_Config["HUD_Enable"] = false --Set to true to enable the HUD icons
    Police_Radio_Config["HUD_Use_Textures"] = false --If enabled. The HUD will use texture files (vtf) instead of a png file
    Police_Radio_Config["HUD_Texture_On"] = "vgui/lordi/darkrp/police_radio_on" --If enabled. The HUD will use texture files (vtf) instead of a png file
    Police_Radio_Config["HUD_Texture_Off"] = "vgui/lordi/darkrp/police_radio_off" --Texture that appears if the radio is currently off
    --******* ^^ These settings will affect your download! *******
    This will make the icon go away and you won't have anymore textures that are missing. (For anyone who wants to keep the icon, do not do this. I will try to find a way to make the icon appear without the missing textures.)

    I will test it with my friend whenever he gets on, I will edit and tell you if it works. If anyone needs anymore help, do not hesitate to post a reply or shoot me a PM. Enjoy!

    EDIT: Works with friends! :)
     
    Last edited: Dec 1, 2015
  9. LordiAnders

    LordiAnders Active Member

    I find it kind of funny how people are making unofficial suggestions (patches), even though i'm still actively supporting this still.
     
  10. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    That means people like your addon.
     
  11. Logic

    Logic New Member

    Oh I love this addon, I enjoy hearing people RP with them responding to 911 calls. Thank you very much, Lordi.
     
  12. burger97979

    burger97979 New Member

    It's a very nice addon Lordi. Would make a good sum of money on Scriptfodder.
     
  13. Panda!

    Panda! New Member

    Sir, Where do i Place the files?
     
  14. burger97979

    burger97979 New Member

    You take it and place it in darkrp_modules which should be located at garrysmod/addons/darkrpmodification/lua/darkrp_modules on your server.
     
  15. M a t i a s ^^

    M a t i a s ^^ New Member

    [ERROR] addons/~darkrpmodification/lua/darkrp_modules/police_radio/cl_p_radio.lua:46: attempt to index a nil value
    1. fn - addons/~darkrpmodification/lua/darkrp_modules/police_radio/cl_p_radio.lua:46
    2. unknown - addons/ulib-master/lua/ulib/shared/hook.lua:110
     
  16. [SS] Gamerpro2266

    [SS] Gamerpro2266 New Member

    i have got no texutre when the radio is off
     
  17. LordiAnders

    LordiAnders Active Member

    @[SS] Gamerpro2266
    You probably don't have a key assigned to the +walk command (Walk key in keyboard settings).
     
  18. [SS] Gamerpro2266

    [SS] Gamerpro2266 New Member

    [ERROR] addons/darkrpmodification/lua/darkrp_modules/police_radio/cl_p_radio.lua:46: attempt to index a nil value
    1. fn - addons/darkrpmodification/lua/darkrp_modules/police_radio/cl_p_radio.lua:46
    2. unknown - addons/ulib/lua/ulib/shared/hook.lua:179

    HELP
     
  19. LordiAnders

    LordiAnders Active Member

    Should be fixed now.
     
  20. [SS] Gamerpro2266

    [SS] Gamerpro2266 New Member

    still got the same error
     

Share This Page