1. Check out the Store if you're looking to Buy HL2RP or other schemas for your server. You can click Buy Schemas on the very top navigation bar to visit the store.
  2. Use the Plugin Center to easily subscribe to and auto-install Clockwork plugins to your server, or submit and share plugins you have developed.
  3. Having trouble setting up or developing with Clockwork? Check out the Wiki or post in the Support Forum for advice from fellow users.
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!

HL2RP Make it so a faction can select a model from a list

Discussion in 'Development' started by NoahtheBoah36™, Apr 16, 2018.

  1. NoahtheBoah36™

    NoahtheBoah36™ Clockwork Customer Active Member

    I am specifically trying to edit the MPF faction such that they choose a normal citizen model to have as their base, and then they wear a clothing item which makes them look like CP's.

    My first attempt to solve this involved editing the FACTION.models in the mpf faction file to look like this
    Code:
    FACTION.models = {
        female = {
        "models/Humans/Group01/Female_01.mdl",
        "models/Humans/Group01/Female_02.mdl",
        "models/Humans/Group01/Female_03.mdl",
        "models/Humans/Group01/Female_04.mdl",
        "models/Humans/Group01/Female_05.mdl",
        "models/Humans/Group01/Female_06.mdl",
        "models/Humans/Group01/Female_07.mdl",
        },
        male = {
        "models/Humans/Group01/Male_01.mdl",
        "models/Humans/Group01/Male_02.mdl",
        "models/Humans/Group01/Male_03.mdl",
        "models/Humans/Group01/Male_04.mdl",
        "models/Humans/Group01/Male_05.mdl",
        "models/Humans/Group01/Male_06.mdl",
        "models/Humans/Group01/Male_07.mdl",
        "models/Humans/Group01/Male_08.mdl",
        "models/Humans/Group01/Male_09.mdl"
        }
    };
    
    However, the problem is that this just randomly assigns one of the models to the player, rather than having them select which one they want.

    I know this is a very simple thing to do but if somebody could help me I'd be immensely grateful.

    EDIT: I AM A DUMBASS!

    I saw just below it as I skimmed the rest of the file a piece of code assigning the first model of the array for the appropriate gender to the character. I'm an idiot and I apologize. I suppose this'll at least serve as a resource for anybody trying to do this in the future.
     

Previous Readers (Total: 0)