003390501570513 said:
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.
Click to expand...
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.