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!

Help with voice commands ingame.

Discussion in 'Discussion' started by kingo, Jul 6, 2014.

  1. Hey Guys i made my own faction (HECU Marine) but the voice commands does not Work they look this way
    This is a few of them
    PLUGIN.voices:AddMarine("Marine", "Hostiles", "Shit we got Hostiles!", "hg_alert2")
    PLUGIN.voices:AddMarine("Marine", "Squad", "Squad neutralize freeman!", "hg_alert3")
    PLUGIN.voices:AddMarine("Marine", "Heads up", "Heads up we got a Hostile!", "hg_alert4")
     
  2. Lev

    Lev certified honorable guy

    Give us your source code.
    Code:
    -- A function to add a voice.
    function Schema.voices:Add(faction, command, phrase, sound, female, menu)
    	self.stored.normalVoices[#self.stored.normalVoices + 1] = {
    		command = command,
    		faction = faction,
    		phrase = phrase,
    		female = female,
    		sound = sound,
    		menu = menu
    	};
    end;
    
    and
    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;
    

    EDIT: Here's a link of how I helped another person. http://forums.cloudsixteen.com/index.php?topic=7118.msg67045#msg67045
     
  3. Code:
    PLUGIN.voices = Clockwork.Kingo("marineVoices");
    
    PLUGIN.voices.stored = {
    	MarineVoices = {}
    };
    
    -- A function to add a Marine voice.
    function PLUGIN.voices:AddMarine(faction, command, phrase, sound, female, menu)
    	self.stored.MarineVoices[#self.stored.marineVoices + 1] = {
    		command = command,
    		faction = faction,
    		phrase = phrase,
    		female = female,
    		sound = sound,
    		menu = menu
    	};
    end;
    
    PLUGIN.voices:AddMarine("Marine", "Got Freeman", "Squad we got freeman!", "hg_alert1.wav")
    PLUGIN.voices:AddMarine("Marine", "Hostiles", "Shit we got Hostiles!", "hg_alert2")
    PLUGIN.voices:AddMarine("Marine", "Squad", "Squad neutralize freeman!", "hg_alert3")
    PLUGIN.voices:AddMarine("Marine", "Heads up", "Heads up we got a Hostile!", "hg_alert4")
    PLUGIN.voices:AddMarine("Marine", "Dead ahead", "Tango dead ahead!", "hg_alert5")
    PLUGIN.voices:AddMarine("Marine", "Movement", "Movement!", "hg_alert6")
    PLUGIN.voices:AddMarine("Marine", "Move in", "Move in!", "hg_attack1")
    PLUGIN.voices:AddMarine("Marine", "Go go go", "Go go go!", "hg_attack2")
    PLUGIN.voices:AddMarine("Marine", "Heavy Fire", "We got heavy fire here!", "hg_attack3")
    PLUGIN.voices:AddMarine("Marine", "Kick your ass", "We are gonna kick your ass!", "hg_attack4")
    PLUGIN.voices:AddMarine("Marine", "Going down", "You are going down!", "hg_attack5")
    PLUGIN.voices:AddMarine("Marine", "Backup", "Request Backup.", "hg_attack6")
    PLUGIN.voices:AddMarine("Marine", "Nothing", "You got nothing.", "hg_attack7")
    PLUGIN.voices:AddMarine("Marine", "Down", "Evrybody down!", "hg_attack8")
    PLUGIN.voices:AddMarine("Marine", "Run down", "Run them down!", "hg_attack9")
    PLUGIN.voices:AddMarine("Marine", "Recon", "Go recon!", "hg_attack10")
    PLUGIN.voices:AddMarine("Marine", "Clear this", "Clear this area!", "hg_attack11")
    PLUGIN.voices:AddMarine("Marine", "Cover fire", "Cover fire!", "hg_attack12")
    PLUGIN.voices:AddMarine("Marine", "Got me", "Ough...He got me!", "hg_hurt1")
    PLUGIN.voices:AddMarine("Marine", "Medic1", "Medic!", "hg_hurt2")
    PLUGIN.voices:AddMarine("Marine", "Medic2", "Medic.", "hg_hurt3")
    PLUGIN.voices:AddMarine("Marine", "Medic3", "Somebody get me a fucking medic!", "hg_hurt4")
    PLUGIN.voices:AddMarine("Marine", "Medic4", "Mother fuck...Medic!", "hg_hurt5")
    PLUGIN.voices:AddMarine("Marine", "Medic5", "Medic!", "hg_hurt6")
    PLUGIN.voices:AddMarine("Marine", "Clear", "All clear sir.", "hg_idle1")
    PLUGIN.voices:AddMarine("Marine", "Check in1", "Recon team check in.", "hg_idle2")
    PLUGIN.voices:AddMarine("Marine", "Check in2", "Check in.", "hg_idle3")
    PLUGIN.voices:AddMarine("Marine", "Status", "Squad what's your status?", "hg_idle4")
    PLUGIN.voices:AddMarine("Marine", "Contact", "Squad Maintain radio contact.", "hg_idle5")
    PLUGIN.voices:AddMarine("Marine", "Area secure", "Area secure over.", "hg_idle6")
    PLUGIN.voices:AddMarine("Marine", "Sector secure", "Sir. Sector secure over", "hg_idle7")
    PLUGIN.voices:AddMarine("Marine", "Barvo Post", "Bravo post clear.", "hg_idle8")
    PLUGIN.voices:AddMarine("Marine", "Delta Team", "Delta Team clear.", "hg_idle9")
    PLUGIN.voices:AddMarine("Marine", "On your toes", "On your toes men.", "hg_idle10")
    PLUGIN.voices:AddMarine("Marine", "No sign", "No sign of objective sir.", "hg_idle11")
    PLUGIN.voices:AddMarine("Marine", "No Hostile", "No sign of hostile sir.", "hg_idle12")
    PLUGIN.voices:AddMarine("Marine", "nade1", "Get down...Grenade!", "hg_nade1")
    PLUGIN.voices:AddMarine("Marine", "nade2", "Grenade!..Get down!", "hg_nade2")
    PLUGIN.voices:AddMarine("Marine", "Shit", "Shit!", "hg_nade3")
    PLUGIN.voices:AddMarine("Marine", "Grenade", "Grenade!", "hg_nade4")
    PLUGIN.voices:AddMarine("Marine", "Take cover", "Take cover!", "hg_nade5")
    PLUGIN.voices:AddMarine("Marine", "Back", "Evrybody back!", "hg_nade6")
    
    
    if (CLIENT) then
    	table.sort(PLUGIN.voices.stored.marineVoices, function(a, b) return a.command < b.command; end);
    	
    	for k, v in pairs(PLUGIN.voices.stored.marineVoices) do
    		Clockwork.directory:AddCode("Marine", [[
    			<div class="auraInfoTitle">]]..string.upper(v.command)..[[</div>
    			<div class="auraInfoText">]]..v.phrase..[[</div>
    		]], true);
    	end;
    end;
     
  4. Lev

    Lev certified honorable guy

    To start off, this is part your problem.
    Code:
    PLUGIN.voices = Clockwork.kernel:NewLibrary("Voices");
     
  5. So i should say voices instead of marinvoices?
     
  6. Lev

    Lev certified honorable guy

    One, no. Two, you put Clockwork.Kingo
    The proper way would be
    Code:
    PLUGIN.voices = Clockwork.kernel:NewLibrary("Voices");
     
  7.  
  8. Lev

    Lev certified honorable guy

    Code:
    PLUGIN.voices = Clockwork.kernel:NewLibrary("MarineVoices");
    This is what you need to put in.
    EDIT: sorry on my phone. Replace ("Voices") with ("MarineVoices") if not ("marineVoices")
    EDIT to EDIT: forget that, if you haven't already done it. I edited the original source. #morningproblems
     
  9. Like that
    Code:
    PLUGIN.voices = Clockwork.Kingo:NewLibrary("Voices");
     
  10. Lev

    Lev certified honorable guy

    No. Don't put Kingo in anything. It stays Kernal.
    PLUGIN.voices = Clockwork.kernal.NewLibrary("MarineVoices)
    Copy and paste.
    Also, let me explain why that won't work.
    PLUGIN.voices = Clockwork.kernal.NewLibrary("MarineVoices")
    That code creates the name for the voices in tab/directory/
    Also, make sure the name of your plugin voices (lua file) is sh_voices.lua not sh_marinevoices.lua, also in the plugins library folder
     
  11. Like that.
    Code:
    PLUGIN.voices = Clockwork.kernal.NewLibrary("MarineVoices)
    Btw about the T-Posing mdl's i talked about can you help me there?
     
  12. Lev

    Lev certified honorable guy

    All you have to do is rig the models. I don't know how to do it myself, so hopefully someone else will help you. Good luck
     
  13. Damn. the voice commands still does not Work when i say them.......
     
  14. Lev

    Lev certified honorable guy

    Also another problem. Replace all the MarineVoice's (NOT THE ONE IN THE PLUGIN.voices = Clockwork.kernal.NewLibrary ("MarineVoices")
    to marineVoices
     
  15. Soo like this
    Code:
    PLUGIN.voices.stored = {
    	MarineVoices = {}
    };
    
    -- A function to add a Marine voice.
    function PLUGIN.voices:AddMarine(faction, command, phrase, sound, female, menu)
    	self.stored.MarineVoices[#self.stored.marineVoices + 1] = {
    		command = command,
    		faction = faction,
    		phrase = phrase,
    		female = female,
    		sound = sound,
    		menu = menu
    	};
    end;
    
    PLUGIN.voices:AddMarine("Marine", "Got Freeman", "Squad we got freeman!", "vo/npc_vj_bmssold_marines/hg_alert1.wav")
    PLUGIN.voices:AddMarine("Marine", "Hostiles", "Shit we got Hostiles!", "hg_alert2")
    PLUGIN.voices:AddMarine("Marine", "Squad", "Squad neutralize freeman!", "hg_alert3")
    PLUGIN.voices:AddMarine("Marine", "Heads up", "Heads up we got a Hostile!", "hg_alert4")
    PLUGIN.voices:AddMarine("Marine", "Dead ahead", "Tango dead ahead!", "hg_alert5")
    PLUGIN.voices:AddMarine("Marine", "Movement", "Movement!", "hg_alert6")
    PLUGIN.voices:AddMarine("Marine", "Move in", "Move in!", "hg_attack1")
    PLUGIN.voices:AddMarine("Marine", "Go go go", "Go go go!", "hg_attack2")
    PLUGIN.voices:AddMarine("Marine", "Heavy Fire", "We got heavy fire here!", "hg_attack3")
    PLUGIN.voices:AddMarine("Marine", "Kick your ass", "We are gonna kick your ass!", "hg_attack4")
    PLUGIN.voices:AddMarine("Marine", "Going down", "You are going down!", "hg_attack5")
    PLUGIN.voices:AddMarine("Marine", "Backup", "Request Backup.", "hg_attack6")
    PLUGIN.voices:AddMarine("Marine", "Nothing", "You got nothing.", "hg_attack7")
    PLUGIN.voices:AddMarine("Marine", "Down", "Evrybody down!", "hg_attack8")
    PLUGIN.voices:AddMarine("Marine", "Run down", "Run them down!", "hg_attack9")
    PLUGIN.voices:AddMarine("Marine", "Recon", "Go recon!", "hg_attack10")
    PLUGIN.voices:AddMarine("Marine", "Clear this", "Clear this area!", "hg_attack11")
    PLUGIN.voices:AddMarine("Marine", "Cover fire", "Cover fire!", "hg_attack12")
    PLUGIN.voices:AddMarine("Marine", "Got me", "Ough...He got me!", "hg_hurt1")
    PLUGIN.voices:AddMarine("Marine", "Medic1", "Medic!", "hg_hurt2")
    PLUGIN.voices:AddMarine("Marine", "Medic2", "Medic.", "hg_hurt3")
    PLUGIN.voices:AddMarine("Marine", "Medic3", "Somebody get me a fucking medic!", "hg_hurt4")
    PLUGIN.voices:AddMarine("Marine", "Medic4", "Mother fuck...Medic!", "hg_hurt5")
    PLUGIN.voices:AddMarine("Marine", "Medic5", "Medic!", "hg_hurt6")
    PLUGIN.voices:AddMarine("Marine", "Clear", "All clear sir.", "hg_idle1")
    PLUGIN.voices:AddMarine("Marine", "Check in1", "Recon team check in.", "hg_idle2")
    PLUGIN.voices:AddMarine("Marine", "Check in2", "Check in.", "hg_idle3")
    PLUGIN.voices:AddMarine("Marine", "Status", "Squad what's your status?", "hg_idle4")
    PLUGIN.voices:AddMarine("Marine", "Contact", "Squad Maintain radio contact.", "hg_idle5")
    PLUGIN.voices:AddMarine("Marine", "Area secure", "Area secure over.", "hg_idle6")
    PLUGIN.voices:AddMarine("Marine", "Sector secure", "Sir. Sector secure over", "hg_idle7")
    PLUGIN.voices:AddMarine("Marine", "Barvo Post", "Bravo post clear.", "hg_idle8")
    PLUGIN.voices:AddMarine("Marine", "Delta Team", "Delta Team clear.", "hg_idle9")
    PLUGIN.voices:AddMarine("Marine", "On your toes", "On your toes men.", "hg_idle10")
    PLUGIN.voices:AddMarine("Marine", "No sign", "No sign of objective sir.", "hg_idle11")
    PLUGIN.voices:AddMarine("Marine", "No Hostile", "No sign of hostile sir.", "hg_idle12")
    PLUGIN.voices:AddMarine("Marine", "nade1", "Get down...Grenade!", "hg_nade1")
    PLUGIN.voices:AddMarine("Marine", "nade2", "Grenade!..Get down!", "hg_nade2")
    PLUGIN.voices:AddMarine("Marine", "Shit", "Shit!", "hg_nade3")
    PLUGIN.voices:AddMarine("Marine", "Grenade", "Grenade!", "hg_nade4")
    PLUGIN.voices:AddMarine("Marine", "Take cover", "Take cover!", "hg_nade5")
    PLUGIN.voices:AddMarine("Marine", "Back", "Evrybody back!", "hg_nade6")
    
    
    if (CLIENT) then
    	table.sort(PLUGIN.voices.stored.marineVoices, function(a, b) return a.command < b.command; end);
    	
    	for k, v in pairs(PLUGIN.voices.stored.marineVoices) do
    		Clockwork.directory:AddCode("Marine", [[
    			<div class="auraInfoTitle">]]..string.upper(v.command)..[[</div>
    			<div class="auraInfoText">]]..v.phrase..[[</div>
    		]], true);
    	end;
    end;
     
  16. Lev

    Lev certified honorable guy

    I meant at the top of the script.
     
  17. Damn this is hard to find out :D
    Sorry for the trouble.
    I dont realy understand
     
  18. Lev

    Lev certified honorable guy

Previous Readers (Total: 0)