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!

Adding Citizen Voices

Discussion in 'Discussion' started by 003390501570513, Jan 1, 2013.

  1. Can someone provide me a sample of what citizen voice commands would look like in the sh_voices.lua file?
     
  2. Replace Combine with Human.
     
  3. Can you provide an example? I think you're suppose to change more than that.
     
  4. Code:
    Schema.voices:Add("Human", "Activation Text", "Say Text", "Male Soundpath", "Female Soundpath");
     
  5. Thanks, it's working!

    One other question though, how do I add the citizen voices to the directory?
     
  6. Ummmmm...
    [​IMG]

    Seriously though, look into the directory file in Clockwork and cl_schema in HL2RP
    Code:
    Clockwork.directory:AddCategory("Civil Protection", "Commands");
     
  7. Hmm, have added this, but it does not seem to recognize. Instead it puts the citizen voice commands inside the Civil Protection directory.
    Code:
    Clockwork.directory:AddCategory("Human", "Commands");
    EDIT: The human category is added, but it does open probably due to nothing be properly assigned to the category, I know I named something wrong.
     
  8. Razor

    Razor Guest

    You need a script to do that. Here:

    Change this part from sh_voices.lua:

    Code:
    if (CLIENT) then
    	table.sort(Schema.voices.stored.normalVoices, function(a, b) return a.command < b.command; end);
    	table.sort(Schema.voices.stored.dispatchVoices, function(a, b) return a.command < b.command; end);
    
    	for k, v in pairs(Schema.voices.stored.dispatchVoices) do
    		Clockwork.directory:AddCode("Combine Dispatcher", [[
    			<div class="auraInfoTitle">]]..string.upper(v.command)..[[</div>
    			<div class="auraInfoText">]]..v.phrase..[[</div>
    		]], true);
    	end;
    
    	for k, v in pairs(Schema.voices.stored.normalVoices) do
    		Clockwork.directory:AddCode("Civil Protection", [[
    			<div class="auraInfoTitle">]]..string.upper(v.command)..[[</div>
    			<div class="auraInfoText">]]..v.phrase..[[</div>
    		]], true);
    	end;
    end;
    To:

    Code:
    if (CLIENT) then
    	table.sort(Schema.voices.stored.normalVoices, function(a, b) return a.command < b.command; end);
    	table.sort(Schema.voices.stored.dispatchVoices, function(a, b) return a.command < b.command; end);
    
    	for k, v in pairs(Schema.voices.stored.dispatchVoices) do
    		Clockwork.directory:AddCode("Combine Dispatcher", [[
    			<div class="auraInfoTitle">]]..string.upper(v.command)..[[</div>
    			<div class="auraInfoText">]]..v.phrase..[[</div>
    		]], true);
    	end;
    
    	for k, v in pairs(Schema.voices.stored.normalVoices) do
    		if v.faction == "Combine" then
    			Clockwork.directory:AddCode("Civil Protection", [[
    				<div class="auraInfoTitle">]]..string.upper(v.command)..[[</div>
    				<div class="auraInfoText">]]..v.phrase..[[</div>
    			]], true);
    		elseif v.faction == "Human" then
    			Clockwork.directory:AddCode("Human", [[
    				<div class="auraInfoTitle">]]..string.upper(v.command)..[[</div>
    				<div class="auraInfoText">]]..v.phrase..[[</div>
    			]], true);
    		end
    	end;
    end;
    Also, remember to add this:
    Code:
    Clockwork.directory:AddCategory("Humans", "Commands");
    In cl_schema.lua, after:

    Code:
    Clockwork.directory:AddCategory("Civil Protection", "Commands");
    Notes: Not tested.
     
  9. After editing a few of the lines, it now is in the proper category, thanks for the help from both of you :)
     
  10. henoik

    henoik Cloud16 Official Support Staff

    Testing... Will edit or add a new post when tested.
     
  11. Commandux

    Commandux Clockwork Customer

    Is it possible to add voices for the faction "admin" ? I want make voices for this faction.
    If yes, how to do it ?

    Thank you ^^
     

Previous Readers (Total: 0)