AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Keeping team client index the same through the campaign (https://forums.alliedmods.net/showthread.php?t=335895)

Jaylow 01-11-2022 05:26

Keeping team client index the same through the campaign
 
Is there anyway to keep the client team index the same through the campaign so everymap it doesnt change?

i have a L4D2 plugin which gets team, starttime, map, players and scores and i am displaying it but because the team client index is constantly changing it is not displaying correctly.

Dragokas 01-17-2022 10:06

Re: Keeping team client index the same through the campaign
 
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;




All times are GMT -4. The time now is 14:02.

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