Garry's Mod Wiki

Revision Difference

serverlist.PlayerList#518045

<function name="PlayerList" parent="serverlist" type="libraryfunc"> <description>Queries a server for its player list.</description> <realm>Menu</realm> <args> <arg name="ip" type="string">The IP address of the server, including the port.</arg> <arg name="callback" type="function">The function to be called if and when the request finishes. Function has one argument, a table containing tables with player info. &#xA;&#xA;Each table with player info has next fields:&#xA;&#xA;&#xA;&lt;page&gt;number&lt;/page&gt; time - The amount of time the player is playing on the server, in seconds&#xA;&#xA;&#xA;&lt;page&gt;string&lt;/page&gt; name - The player name&#xA;&#xA;&#xA;&lt;page&gt;number&lt;/page&gt; score - The players score</arg>⤶ <arg name="callback" type="function">The function to be called if and when the request finishes. Function has one argument, a table containing tables with player info. ⤶ Each table with player info has next fields:⤶ ⤶ ⤶ <page>number</page> time - The amount of time the player is playing on the server, in seconds⤶ ⤶ ⤶ <page>string</page> name - The player name⤶ ⤶ ⤶ <page>number</page> score - The players score</arg>⤶ </args> </function>