AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   tf2 Set player skin family? (https://forums.alliedmods.net/showthread.php?t=92724)

BrutalGoerge 05-18-2009 20:02

tf2 Set player skin family?
 
All the tf2 player models have 4 skin families.
red, blu, red uber, blu uber.

Is it possible to set it with a plugin?

http://img527.**************/img527/4...icskinfams.jpg

NeoDement 05-18-2009 20:35

Re: tf2 Set player skin family?
 
You can set a sentry guns colour with this snippet, maybe you could adapt it to your needs:

Code:

    SetEntData(iSentry, FindSendPropOffs("CObjectSentrygun","m_nSkin"),                    iNewSkinNumber, 1, true);

BrutalGoerge 05-18-2009 20:40

Re: tf2 Set player skin family?
 
i found that, and tried... failed... guess i am too stupid to figure it out. :[

NeoDement 05-19-2009 14:36

Re: tf2 Set player skin family?
 
SetEntData(client, FindSendPropOffs("CTFPlayer","m_nSkin"), iNewSkinNumber, 1, true);
???

BrutalGoerge 05-19-2009 19:33

Re: tf2 Set player skin family?
 
that's what I tried, no error, but no skin =\

Honestly, if it was this easy, I think someone would have done it by now. I know a few authors who have been trying to get this to work off and on for a while now. I was kinda just making sure everyone didnt miss something obvious :(

NeoDement 05-19-2009 21:30

Re: tf2 Set player skin family?
 
Well, m_nSkin isn't on http://wiki.alliedmods.net/CTFPlayer...eam_Fortress_2)

So I guess I should have checked that first, sorry for that :)

pRED* 05-20-2009 04:56

Re: tf2 Set player skin family?
 
NeoDement: That's the virtual function list, entity props are at http://wiki.alliedmods.net/Category:Game_Resources

BrutalGoerge: I think the m_nSkin value actually used to render players is calculated locally (on the client) as a combination of m_iTeam and m_nPlayerCond (the ubercharge flag in particular).

BrutalGoerge 05-20-2009 05:23

Re: tf2 Set player skin family?
 
and I dont think its possible to set the uber cond with sm.

meh. i really have no idea what i'm doing. thanks anyway.

//gives up

bl4nk 05-20-2009 10:08

Re: tf2 Set player skin family?
 
You need an extension to do this. To do it you have to update the m_nPlayerCond netprop with the PLAYERCOND_UBERED flag through a proxy. It's a bit confusing, but once Crimson finishes up TF2:RA, I'll be releasing a simple extension to do it.

NeoDement 05-20-2009 13:16

Re: tf2 Set player skin family?
 
Quote:

Originally Posted by pRED* (Post 830933)
NeoDement: That's the virtual function list, entity props are at http://wiki.alliedmods.net/Category:Game_Resources

I don't even know how I didn't spot that. :oops:


All times are GMT -4. The time now is 15:31.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.