Model has multiple skins, how to separate them as selectable models with lua?

Hey, I am here to ask help with one thing that I’d like to know.
This is not about changing a skin of a ragdoll or anything like that.
Let’s put it like this:

I have several player models which have different skingroups and I’d like to know how I could specify a skin I want for a playermodel?
This is for an RP gamemode and I’d like to know to select the skin for one model.
So in conclusion, there is one model with 10 different skins and I’d like to have them all as separate selectable models in the character creation menu.
Sorry for the messy explanation, I hope you get the picture of it.

Are you asking for code or for HELP IN CODING?
Anyways, either cases, you’ll need to tell us what script are you using, and if it’s a custom one, to give us some code for us to code on.

Also, if you want some tips or a help in coding, instead of digested code, you should post this on questions.


PlayerModels = 
{
    Model( "models/humans/group01/male_01.mdl" ),
    Model( "models/humans/group01/male_02.mdl" ),
    Model( "models/humans/group01/male_03.mdl" ),
    Model( "models/humans/group01/male_04.mdl" ),
    Model( "models/humans/group01/male_06.mdl" ),
    Model( "models/humans/group01/male_07.mdl" ),
    Model( "models/humans/group01/male_08.mdl" ),
    Model( "models/humans/group01/male_09.mdl" ),
    Model( "models/humans/group02/male_01.mdl" ),
    Model( "models/humans/group02/male_02.mdl" ),
    Model( "models/humans/group02/male_03.mdl" ),
    Model( "models/humans/group02/male_04.mdl" ),
    Model( "models/humans/group02/male_06.mdl" ),
    Model( "models/humans/group02/male_07.mdl" ),
    Model( "models/humans/group02/male_08.mdl" ),
    Model( "models/humans/group02/male_09.mdl" ),
    Model( "models/humans/group01/female_01.mdl" ),
    Model( "models/humans/group01/female_02.mdl" ),
    Model( "models/humans/group01/female_03.mdl" ),
    Model( "models/humans/group01/female_04.mdl" ),
    Model( "models/humans/group01/female_06.mdl" ),
    Model( "models/humans/group01/female_07.mdl" ),
    Model( "models/humans/group02/female_01.mdl" ),
    Model( "models/humans/group02/female_02.mdl" ),
    Model( "models/humans/group02/female_03.mdl" ),
    Model( "models/humans/group02/female_04.mdl" ),
    Model( "models/humans/group02/female_06.mdl" ),
    Model( "models/humans/group02/female_07.mdl" )
}

There is the code, those are the default models but I will replace them as when I know how to separate their skins as selectable models.

Bump, I’d like to know is there a way to do this.
Please.

**[Entity.SetSkin

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Entity.SetSkin)
**
And I think **[Entity.SkinCount

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Entity.SkinCount)** will assist you in finding what skins a model has.

Yeah, I was thinking of that.
I think that it needs to be tried at least, I get back to this if it doesn’t work.