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

[TF2] How to update model for wear level on decorated weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fakuivan
Senior Member
Join Date: Nov 2015
Old 07-31-2017 , 22:12   [TF2] How to update model for wear level on decorated weapons
Reply With Quote #1

I've managed to change the wear level on decorated weapons with the attribute "set_item_texture_wear" using TF2Attributes. It works but the texture does not update unless I drop the weapon (suicide) and pick it up. I tried to clear the attribute cache via TF2Attrib_ClearCache on the weapon and the owner, but that didn't help.
I could create a dummy weapon, make the player pick it up (using the methods explained in this tutorial), pick the modified weapon (the dropped one), and then removing the dummy one, but I'd rather find a more elegant way to do it.

Any ideas on how I can make this work (besides the solution mentioned above)?
__________________
fakuivan is offline
fakuivan
Senior Member
Join Date: Nov 2015
Old 08-01-2017 , 12:03   Re: [TF2] How to update model for wear level on decorated weapons
Reply With Quote #2

The commands "cl_first_person_uses_world_model 1; wait 100; cl_first_person_uses_world_model 0;" refresh the texture cache, applying the new wear level. Now I need to clear that cache from the server (if possible)
__________________
fakuivan 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 13:44.


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