Garry's Mod Wiki

Revision Difference

Structures/ServerQueryData#512059

<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>⤶ ⤶ {{StructureField|string|Type|Type of servers to retrieve. Valid values are:⤶ * "internet"⤶ * "favorite"⤶ * "history"⤶ * "lan"⤶ }}{{StructureField|number|AppID|Steam application ID to get the servers for|4000}}{{StructureField|function|Callback|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.⤶ }}{{StructureField|function|Finished|Called when the query is finished. No arguments}}⤶ }}