--
[ Picked text/plain from multipart/alternative ]
Well, for something simply cosmetic, simply have the user choose through a
VGUI menu or whatever, then store their choice in a simple var in the player
class, then on spawn, set their model based upon what the # is, example:

void CSDKPlayer::Precache()
{
    PrecacheModel( CLASS1MODEL );
    ...
    PrecacheModel(CLASS8MODEL); //2 teams * 4 models

    BaseClass::Precache();
}

void CSDKPlayer::Spawn()
{
    BaseClass::Spawn();

if(GetTeamNumber()==TEAM_FIRSTTEAM||GetTeamNumber()==TEAM_TEAMSECONDTEAM)
//No observers getting the custom models.
    {
        switch(m_iPlayerClass) //Class variable in the player class
        {
        case CLASS_CLASS1:
            SetModel(CLASS1MODEL );


          ...

          case CLASS_CLASS8:
             SetModel(CLASS8MODEL);

          default:
              SetModel(SOMEOTHERMODEL)
    }
}

Hope that helps, was some ripped out and dumbed down code from the mod I'm
working on.

On Jan 21, 2008 4:45 AM, Kushan Gunasekera <[EMAIL PROTECTED]> wrote:

> --
> [ Picked text/plain from multipart/alternative ]
> I was wondering how you can implement a player class system like there is
> in
> Counter Strike or Counter Strike: Source. It is just pure cosmetics (has
> no
> affect on anything such as health, weapon etc. just a different model
> file).
> I already have 2 teams so I would just like classes for those 2 teams. I
> have an image here (I knows its crappy but it should give you the basic
> idea): http://www.imagehosting.com/show.php/1524455_untitled.bmp.html
>
> I also would like to know why every time I press on say the Rebels button
> when I select a team, I suicide and then I spawn as a rebel. I'm not very
> good at coding so could you please tell me what to do exactly? Thanks.
> --
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
--

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to