team.GetPlayers
From GMod Wiki
| Function | |
| Syntax |
team.GetPlayers( Integer TeamIndex ) Where is this used? |
| Description: | |
| Gets all the players in the specific Team. | |
| Returns: | Table Players |
| Part of Library: | Team |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Team.GetPlayers]Team.GetPlayers [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
| Description | Gets Team 1's players and display their name in the console. |
|---|---|
| Used on | |
| Code | for _,ply in pairs(team.GetPlayers(1)) do print(ply:GetName()) end |
| Output | Outputs Team 1's player names in Console. |