Garry's Mod Wiki

Revision Difference

serverlist.PlayerList#512848

<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>⤶ </args>⤶ </function>⤶ ⤶