Garry's Mod Wiki

Revision Difference

team.GetPlayers#511761

<function name="GetPlayers" parent="team" type="libraryfunc">⤶ <description>Returns a table with all player of the specified team.</description>⤶ <realm>Shared</realm>⤶ <args>⤶ <arg name="teamIndex" type="number">The team index.</arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="table">A table of <page>Player</page>s that belong to the requested team.</ret>⤶ </rets>⤶ </function>⤶ ⤶ <example>⤶ <description>Prints all the players in a player's team.</description>⤶ <code>PrintTable(team.GetPlayers(ply:Team()))</code>⤶ <output>List of players.</output>⤶ ⤶ </example>