Garry's Mod Wiki

Revision Difference

Structures/ServerQueryData#517070

<cat>struct</cat> <structure> <description>Used for <page>serverlist.Query</page>.</description> <fields>{{StructureField|string|GameDir|The game directory to get the servers for|garrysmod</fields>⤶ ⤶ </structure>⤶ ⤶ <item name="Type" type="string">Type of servers to retrieve. Valid values are: <fields>⤶ <item name="GameDir" type="string" default="garrysmod">The game directory to get the servers for</item>⤶ <item name="Type" type="string">Type of servers to retrieve. Valid values are: * "internet" * "favorite" * "history" * "lan"</item> {{StructureField|number|AppID|Steam application ID to get the servers for|4000}}<item name="Callback" type="function">Called when a new server is found and queried. Arguments:⤶ <item name="AppID" type="number" default="4000">Steam application ID to get the servers for</item>⤶ <item name="Callback" type="function">Called when a new server is found and queried. Arguments:⤶ <page>number</page> ping - Latency to the server. <page>string</page> name - Name of the server <page>string</page> desc - "Nice" gamemode name <page>string</page> map - Current map <page>number</page> players - Total player number ( bot + human ) <page>number</page> maxplayers - Maximum reported amount of players <page>number</page> botplayers - Amount of bots on the server <page>boolean</page> pass - Whether this server has password or not <page>number</page> lastplayed - Time when you last played on this server, as UNIX timestamp or 0 <page>string</page> address - IP Address of the server <page>string</page> gamemode - Gamemode folder name <page>number</page> workshopid - Gamemode Steam Workshop ID Return false to stop the query.</item> <item name="Finished" type="function">Called when the query is finished. No arguments</item> ⤶ }} </fields>⤶ ⤶ </structure>⤶ ⤶