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!

Faction skeleton

Discussion in 'Plugins' started by Atebite, Jun 18, 2014.

  1. Faction skeleton w/examples and comments to explain.

    Code:
    local FACTION = Clockwork.faction:New("") -- Faction name
    
    FACTION.useFullName = true -- Whether or not to use full names for the faction
    FACTION.isCombineFaction = false -- Whether or not the faction is a Combine faction
    FACTION.whitelist = true -- Whether or not you need a whitelist to join the faction
    FACTION.material = "" -- The image displayed for the faction during character creation
    FACTION.models = { -- The models used by the faction
    	female = {
    	"models/humans/group01/female_01.mdl",
    	"models/humans/group01/female_02.mdl"},
    
    	male = {
    	"models/humans/group01/male_01.mdl",
    	"models/humans/group01/male_02.mdl"}
    }
    
    -- Called when a player's name should be assigned for the faction.
    function FACTION:GetName(player, character)
    
    end
    
    -- Called when a player's model should be assigned for the faction.
    function FACTION:GetModel(player, character)
    	if (character.gender == GENDER_MALE) then
    		return self.models.male[1]
    	else
    		return self.models.female[1]
    	end
    end
    
    -- Called when a player is transferred to the faction.
    function FACTION:OnTransferred(player, faction, name)
    	if (player:QueryCharacter("gender") == GENDER_MALE) then
    		player:SetCharacterData("model", self.models.male[1], true)
    	else
    		player:SetCharacterData("model", self.models.female[1], true)
    	end
    end
    
    FACTION_FACTIONENUM = FACTION:Register() -- Change FACTIONENUM to a unique title for your faction (preferably a shortened version of the faction name)
    
     
  2. TheHipster

    TheHipster rhenz is a fairly decent fellow

    Re: Factions skeleton

    And with that, all the needed skeletons are now made, so we can now redirect users here if they have any questions, Much obliged Atebite.
     
  3. TheDogFather

    TheDogFather Guest

    Do I not get credit for the item? ;-;
     
  4. You started the trend, have a cookie for promoting productivity and contribution.

    [​IMG]
     
  5. TheDogFather

    TheDogFather Guest

    I like cookies. Thank you, bby.
     
  6. Ilu too bae, let's have kids. Cookie kids.
     
  7. TheHipster

    TheHipster rhenz is a fairly decent fellow

    Atebite is cheating on me. I cry.
     
  8. TheDogFather

    TheDogFather Guest

    Can I ask how you'd change it, so when you spoke in OOC you can give it a different colour.
     
  9. It isn't really that hard to make a faction, this seems pretty unneeded in my mind.
     
  10. There's a lot of people who think it is, though. This is for them.
     
  11. kurozael

    kurozael Cloud Sixteen Director Staff Member Administrator Investor

    This is sort of what the wiki is for though.
     
  12. TheHipster

    TheHipster rhenz is a fairly decent fellow

    No one reads the wiki [member=1]kurozael[/member] let's face it, it's exceedingly under-used, we need to market it better if we wan't people to check it often.
     
  13. kurozael

    kurozael Cloud Sixteen Director Staff Member Administrator Investor

    That's exactly my point.
     
  14. The wiki is broken. I added pages for all the libraries but they all 404.
     
  15. TheHipster

    TheHipster rhenz is a fairly decent fellow

    I'm telling you man, I wanna re-set up the wiki but I'm to lazy to do it on my own, I need someone to keep me in focus and help when I fuck up, Anyone in? At all? Atebite?
     
    • Agree Agree x 1
  16. TheDogFather

    TheDogFather Guest

    I would help, but I'm too lazy to do absolutely shit.
     
  17. All of these contributions are great. Danke herr Atebite.
     
  18. Maybe if it worked.
     

Previous Readers (Total: 0)