Revision Difference
Structures/ServerQueryData#546041
<cat>struct</cat>
<structure>
<realm>Menu</realm>
<description>Used for <page>serverlist.Query</page>.</description>
<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` and `lan`</item>
<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
<page>boolean</page> isanon - Is the server signed into an anonymous account?
<page>number</page> version - Version number, same format as <page>jit.version_num</page>
<page>string</page> version - Version number, same format as <page>jit.version_num</page>
<page>string</page> localization - Two digit country code, <page>nil</page> if `us`⤶
<page>string</page> localization - Two digit country code, `us` if <page>nil</page>⤶
<page>string</page> gmcategory - Category of the gamemode, ex. `pvp`, `pve`, `rp` or `roleplay`
Return false to stop the query.
</item>
<item name="CallbackFailed" type="function">
Called if the query has failed, called with the servers IP Address
</item>
<item name="Finished" type="function">Called when the query is finished. No arguments</item>
</fields>
</structure>