Raised This Month: $32 Target: $400
 8% 

[TF2] Change players viewmodel team skin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
foon
Member
Join Date: Dec 2018
Old 12-12-2019 , 09:42   [TF2] Change players viewmodel team skin
Reply With Quote #1

Would anyone know if there is a way to change a players viewmodel team skin? I would like to change the viewmodel skin to the opposite team. I found CBaseViewModel but setting m_nSkin doesnt do anything (unless im not doing ti right?)

Code:
public Action player_spawn(Event event, const char[] name, bool dontBroadcast)
{
	int client = GetClientOfUserId(event.GetInt("userid"));

	int test = GetEntProp(client, Prop_Send, "m_nSkin");
	PrintToServer("%i", test);
	
	// red = 0
	// blue = 1
	
	SetEntProp(client, Prop_Send, "m_nSkin", BLUE);
}
foon is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 12-12-2019 , 11:26   Re: [TF2] Change players viewmodel team skin
Reply With Quote #2

Here's a link to an interesting discussion on skins: https://forums.alliedmods.net/showthread.php?t=232434

In that link Mitchell suggests trying this:

Quote:
m_bForcedSkin to 1
m_nForcedSkin to skin you want
PC Gamer is offline
foon
Member
Join Date: Dec 2018
Old 12-12-2019 , 12:34   Re: [TF2] Change players viewmodel team skin
Reply With Quote #3

I have already tried that, it only sets the player skin, it does not set the viewmodel skin (the players arms).
foon is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:38.


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