Quote:
Originally Posted by nosoop
Coo'.
You're getting a mismatch because the tag is TFCond and not int:
I strongly recommend using TF2_AddCondition instead of modifying entity properties; the former has a greater chance of being future-proof, plus you can pass a duration value to it.
Also, the HookEvent() function would probably be better being called on plugin start just once; the event hook callback is fired on all matching events and not on any particular client (as SDKHooks does), so you'll need to make sure the client actually has a condition set.
On that note, there also isn't a default invalid value for TFCond, so use a nonexistent (e.g., negative) value for TFCond and check it before applying a condition to your players.
|
It's not just that, but m_nPlayerCond is (last I checked) one of 3 bitfields that Valve uses to store conditions in. Which also means that just assigning a value to it is inherently wrong.
__________________