Quote:
Originally Posted by Whai
For switch to spectator team, you can just use that :
|
Again, your snippet, while it might work for this particular use case, just remains a workaround the many hidden rules one game might have when using
PHP Code:
TF2_ChangeClientTeam
or
PHP Code:
TF2_RespawnPlayer
Here you miss the point that my snippet is all about switching a player's team, without changing their current state or calling any game functions.
Quote:
Originally Posted by Whai
because with your method, we have to check offsets every updates
|
hasn't changed in years by Valve, the vtable offsets used today are likely to be still valid in 20 years from now.
Quote:
Originally Posted by Whai
If you want to change team but not in spectator, just use this
|
I'm already aware of this method, I've been using it myself for as long as I can remember
https://github.com/Kenzzer/Slender-F...stocks.sp#L600
Again this misses the point of this snippet, here it's provide something that will work "universally" across all source games. (hence the tag [ANY])
You're not safe from a game where the dev decided that they don't care if the player is alive or not, and will make the player respawn anyway regardless of their state/team upon calling sourcemod's
PHP Code:
ChangeClientTeam
While on the other hand the snippet I provided will work, regardless of the set of "hidden" rules behind the function
PHP Code:
ChangeClientTeam
__________________