player.GetHumans
From GMod Wiki
Function | |
Syntax |
player.GetHumans( ) Where is this used? |
Description: | |
Returns a table of all the connected human players as Player objects. | |
Returns: | Table :Player |
Part of Library: | Player |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Player.GetHumans]Player.GetHumans [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | This example grabs all the human player objects, and prints out each name. |
---|---|
Used on | |
Code | for k, v in pairs(player.GetHumans()) do Msg( v:Nick() .. "\n") end |
Output | N/A |
Additional Notes
- Don't use a variable called "player" as this will mess this up. Overwriting a default table is bad.
- If this function is called from the client, it will include bots!