Garry's Mod Wiki

Revision Difference

Structures/ServerQueryData#527080

<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" * "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 Return false to stop the query.</item> <item name="Finished" type="function">Called when the query is finished. No arguments</item> </fields> </structure>