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!

Assistance with Faction Creation

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

  1. Main question is in bold.

    Been working on a custom faction and wish to add it's own voice command directory. I have added the directory and voice commands properly, but seem to be unable to connect the faction with the voices.

    I noticed that citizen is identified by "human" in the directory, where exactly is that defined? I could just add the faction to PlayerIsCombine = true, but wish to not have the faction characters sounding like their wearing a vocoder.
     
  2. Ehh this can be helpful.

    sv_schema

    Code:
    -- A function to check if a player is Combine.
    function Schema:PlayerIsCombine(player, bHuman)
    	if (IsValid(player) and player:GetCharacter()) then
    		local faction = player:GetFaction();
    		
    		if (self:IsCombineFaction(faction)) then
    			if (bHuman) then
    				if (faction == FACTION_MPF) then
    					return true;
    				end;
    			elseif (bHuman == false) then
    				if (faction == FACTION_MPF) then
    					return false;
    				else
    					return true;
    				end;
    			else
    				return true;
    			end;
    		end;
    	end;
    end;
    ----------------------------------------------
    sv_hooks

    Code:
    -- Called when a player's typing display has started.
    function Schema:PlayerStartTypingDisplay(player, code)
    	if (Schema:PlayerIsCombine(player) and !player:IsNoClipping()) then
    		if (code == "n" or code == "y" or code == "w" or code == "r") then
    			if (!player.typingBeep) then
    				player.typingBeep = true;
    				
    				player:EmitSound("npc/overwatch/radiovoice/on1.wav");
    			end;
    		end;
    	end;
    end;
     
  3. Razor

    Razor Guest

    Not hwat he needs.
    He needs to know how to make a faction with custom voice commands just for them.
     
  4. Small mistake, fixed it now.

    Edit:
    For those who are wondering...

    Check line 1448 in sv_hooks (schema folder).
     

Previous Readers (Total: 0)