Raised This Month: $51 Target: $400
 12% 

[TF2] Problem With Viewmodels


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NC.svtrade
Senior Member
Join Date: Nov 2015
Old 10-09-2017 , 03:52   [TF2] Problem With Viewmodels
Reply With Quote #1

https://youtu.be/ttyKBybm19U
HTML Code:
public Action spvmm(client, args) {
	if (!IsModelPrecached("models/tfcs/weapon/gun/v_mach_m249para.mdl")) PrecacheModel("models/tfcs/weapon/gun/v_mach_m249para.mdl");
	
	//new slot = GetPlayerWeaponSlot(client, 0);
	//SetEntityRenderMode(slot, RENDER_TRANSCOLOR); 
	//SetEntityRenderColor(slot, _, _, _, 0);
	
	new WeaponModel = GetEntPropEnt(client, Prop_Data, "m_hViewModel");
	
	SetEntData(WeaponModel, FindSendPropOffs("CBaseCombatWeapon", "m_iWorldModelIndex"), PrecacheModel("models/tfcs/weapon/gun/w_mach_m249para.mdl"), 4, true);
	SetEntData(WeaponModel, FindSendPropOffs("CBaseEntity", "m_nModelIndex"), PrecacheModel("models/tfcs/weapon/gun/v_mach_m249para.mdl"), 4, true);
	SetEntProp(WeaponModel, Prop_Send, "m_nSequence", 0);
	
	PrintToChatAll("Viewmodel Created: %d, Owner: %N", WeaponModel, client);
}
I want to remove the original viewmodel, and replace the new viewmodel.

Help!
NC.svtrade is offline
cigzag
AlliedModders Donor
Join Date: Nov 2014
Location: NZ
Old 10-10-2017 , 17:32   Re: [TF2] Problem With Viewmodels
Reply With Quote #2

Why are you prechacing if you already have done it above?

also
Code:
int WeaponModel = GetEntPropEnt(client, Prop_Data, "m_hViewModel");
Doesn't really matter but still.

Last edited by cigzag; 10-10-2017 at 17:32.
cigzag is offline
NC.svtrade
Senior Member
Join Date: Nov 2015
Old 10-11-2017 , 06:34   Re: [TF2] Problem With Viewmodels
Reply With Quote #3

Quote:
Originally Posted by SnowTigerVidz View Post
Why are you prechacing if you already have done it above?

also
Code:
int WeaponModel = GetEntPropEnt(client, Prop_Data, "m_hViewModel");
Doesn't really matter but still.
"Prechacing Again" is for two reason.
1. Just for Sure.
2. I'm lazy.

"Doesn't really matter but still."
What does it mean?
NC.svtrade is offline
cigzag
AlliedModders Donor
Join Date: Nov 2014
Location: NZ
Old 10-11-2017 , 19:42   Re: [TF2] Problem With Viewmodels
Reply With Quote #4

Quote:
Originally Posted by NC.svtrade View Post
"Doesn't really matter but still."
What does it mean?
When I pointed out the new should be int in new syntax.
cigzag 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 22:25.


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