View Single Post
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-24-2015 , 10:31   Re: Spawn Player like in opposite team
Reply With Quote #2

The tricky and easy way would be likely like hooking Spawn as pre, setting m_iTeam to CT, call ClientUserInfoChanged to update model, then in Spawn as post, set back team to T.

To lower possible issue of m_iTeam binge used by others plugin at this point, you can hook instead Ham_StartSneaking, which is called in Spawn, but right before the spawnpoint stuff. (You could also hook Spawn, and hooking StartSneaking insside, but it's unlikely a plugin would call this function, it does nothing).
__________________
Arkshine is offline