Raised This Month: $ Target: $400
 0% 

[TF2] Simple Instant Class Change Snip.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mitchell
~lick~
Join Date: Mar 2010
Old 10-31-2017 , 17:38   Re: [TF2] Simple Instant Class Change Snip.
Reply With Quote #1

This is nice, however is there any difference between setting m_iClass instead of TF2_SetPlayerClass?
Currently Regenerating a player after SetPlayerClass has weird effects, like visually setting the player to that class but some times not their health (however the max health changes) and some of the wearables that are for all classes. I.e. spy wearing heavy's Triad Trinket.

Quote:
Originally Posted by Neuro Toxin View Post
Couldn't this loop if you dont check the clients class is already equal to the class you're forcing?
Setting m_iClass doesn't trigger the class change event.

Last edited by Mitchell; 10-31-2017 at 17:40.
Mitchell is offline
ThatKidWhoGames
Veteran Member
Join Date: Jun 2013
Location: IsValidClient()
Old 10-31-2017 , 21:38   Re: [TF2] Simple Instant Class Change Snip.
Reply With Quote #2

Quote:
Originally Posted by Mitchell View Post
This is nice, however is there any difference between setting m_iClass instead of TF2_SetPlayerClass?
Currently Regenerating a player after SetPlayerClass has weird effects, like visually setting the player to that class but some times not their health (however the max health changes) and some of the wearables that are for all classes. I.e. spy wearing heavy's Triad Trinket.



Setting m_iClass doesn't trigger the class change event.
I was gonna say including tf2_stocks and adding TF2_SetPlayerClass makes the code look a lot neater.
ThatKidWhoGames 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 18:53.


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