View Single Post
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 01-17-2022 , 10:06   Re: Keeping team client index the same through the campaign
Reply With Quote #2

There are two terms in versus related to teams:

1) client team - which is changed once per each map for each player. Can be retrieved via GetClientTeam().
2) logical team - which is not changed during the whole campaign, unless you specially moved to another team.

To get the logical team from client index you can use the stock below:
PHP Code:
int GetLogicalTeam(int client)
{
    return (
GetClientTeam(client) ^ GameRules_GetProp("m_bAreTeamsFlipped"1)) - 1;

__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 01-17-2022 at 10:07.
Dragokas is offline