Player SetTeam: Difference between revisions

This is an action special too
(Created page with "{{Template:ACSWarning}} '''145:Player_SetTeam (int ''team'', bool ''nobroadcast'') ==Usage== Changes the team of the player who activated the special to ''team''. The second...")
 
(This is an action special too)
Tag: Source edit
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:Player_SetTeam}}
{{Template:ACSWarning}}
{{Template:ACSWarning}}
'''145:Player_SetTeam (int ''team'', bool ''nobroadcast'')
'''145:Player_SetTeam (int ''team''[, bool ''nobroadcast''])'''


==Usage==
== Usage ==
Changes the team of the player who activated the special to ''team''. A valid team is anywhere between 0 and sv_maxteams (so 2, 3, 4). The teams are 0 = Blue, 1 = Red, 2 = Green, 3 = Gold. Using the current value of sv_maxteams removes the player from their current team without making them join another.


Changes the team of the player who activated the special to ''team''. The second argument is optional and only available in Zandronum 3.1, which suppresses the "{player} joined the {team}" message.  
=== Parameters ===
* ''team'': ID of the team for the player to join.
* ''nobroadcast'': When true, the team switch will not be announced in chat.


==Example==
=== Return value ===
Returns true if the player was switched successfully.
 
== Examples ==
{{noexamples}}
{{noexamples}}
[[Category: ACS functions]]
[[Category: Action specials]]