1. This forum is ARCHIVED! Visit the new Cloud Sixteen forums, codename Eden, at https://eden.cloudsixteen.com. These forums will remain archived for a few months before being closed down, so try to encourage plugin developers to begin moving their content across to the new forums.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

Human Voice Directory

Discussion in 'Discussion' started by Zaestos, Mar 23, 2013.

  1. I've added this line of code

    When looking in the directory in-game the citizen voice commands are added into the civil protection directory automatically. How can I add my custom human voices to the custom "citizens" directory I created? Thank you.

    Sorry the code is in quote form but the forum thinks I am posting a link when using [c0de] tags.
     
  2. diablo1675

    diablo1675 Guest

    I'm not exactly sure wether HL2RP supports more than one directory for voice commands. You'd have to ask Kurochi.
     
  3. I think it's supposed to be "Human" instead of "Citizens".

    And why would he have to ask Kurochi about this? Kurochi is a fantastic coder but IDK why you think he is the only one that knows how to do this.

    It's possible to make Human voices go in their own directory but you'd have to edit Schema.voices:Add and make a new table cause there's only two types of voice tables.

    Dispatch and Civil Protection.

    Code:
    for k, v in pairs(Schema.voices.stored.normalVoices) do
    		Clockwork.directory:AddCode("Civil Protection"
    As you can see below, Schema.voices:Add adds it to the normalVoices table. All the contents of the normalVoices table are dumped into the Civil Protection tab, so you need to modify Schema.voices:Add

    Code:
    function Schema.voices:Add(faction, command, phrase, sound, female, menu)
    	self.stored.normalVoices[#self.stored.normalVoices + 1] = {
    Here's something I threw together. Just did that in a few mins so it might not work but it's a start.

    http://pastebin.com/raw.php?i=SwF6iWLt
     
  4. diablo1675

    diablo1675 Guest

    Hold the fuck up. I know Kurochi, because he's a good coder. And I just picked a random name. No need to get offended.
     
  5. I'm not offended. I'm just responding to you because you said he has to. It's like if someone was looking for directions and you said they have to talk to a certain person, when in reality there's more than one person that knows where things are. He would spend time looking for that specific person even though there's other people around. You could have worded it better.

    "I think Kurochi might know."
     
  6. diablo1675

    diablo1675 Guest


    Agreed, then. Will keep it in mind.
     
  7. So I just add the pastebin code to sh_voices.lua?
     
  8. Only replace something if it is in the pastebin code.

    So replace the Schema.voices:Add code in sh_voices with the one on pastebin. Also replace Schema.voices.stored

    The code all the way at the bottom isn't included in the default sh_voices so you can just put that code at the bottom of it.

    Of course, you still need to add the directory listing for the citizen voices somewhere. The function below is a clientside function so you should put it in a clientside file. Use the one below instead of the one in your original post.

    Code:
    Clockwork.directory:AddCategory("Citizen Voices", "Commands");
     
  9. When I join I get kicked for too many lua errors.
     
  10. You must have done something wrong :X

    *or I messed up
     
  11. Can I add you on steam to take this into further detail?
     
  12. We've worked through the issue thanks to Duck for his splendid support.

    +100 cloudsixteen
     
  13. MattDavis101

    MattDavis101 Guest

    I understand this topic has not been posted in for at least 60 days. But please consider helping me on this, I will do anything to get some help on getting the voice directory for the Citizens to show up. Everything else is fine I just need help on this one thing. Please if someone could add me on Steam my username is SadGardenGnome. Much appreciated!
    -MattDavis101
     
  14. Razor

    Razor Guest

    I.. made a plugin for this.. it's already released :\
     

Previous Readers (Total: 0)