1,584
edits
(Added alternative for CLIENTSIDE scripts) |
DrinkyBird (talk | contribs) No edit summary Tag: Source edit |
||
Line 2: | Line 2: | ||
int '''PlayerTeam''' (void) | int '''PlayerTeam''' (void) | ||
==Usage== | == Usage == | ||
=== Return value === | |||
This function returns the activator's team, or the amount of teams if the player is not on a team. This is equivalent to <code>{{Zdoomwiki|GetPlayerInfo}}(PlayerNumber(), PLAYERINFO_TEAM)</code>. This function always returns 0 in a CLIENTSIDE script; use <code>GetPlayerInfo(ConsolePlayerNumber(), PLAYERINFO_TEAM)</code> instead. | |||
*'''TEAM_BLUE''' = 0 | *'''TEAM_BLUE''' = 0 | ||
:The player is on the Blue team. | :The player is on the Blue team. | ||
Line 14: | Line 15: | ||
:The player is on the Gold team. | :The player is on the Gold team. | ||
==Examples== | ==Examples== | ||
<syntaxhighlight lang="c" line="1"> | <syntaxhighlight lang="c" line="1"> | ||
Script 1 ENTER | Script 1 ENTER | ||
Line 31: | Line 30: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[category:ACS | |||
[[category:ACS functions]] |