Garry's Mod Wiki

Garry's Mod Wiki

  serverlist.Query( table data )

Description

Queries the master server for server list.

Arguments

1 table data
The information about what kind of servers we want. See ServerQueryData structure

Example: Setting up this function

Showcasing how to utilize this function

local data = { Type = "internet", GameDir = "garrysmod", AppID = 4000, Callback = function(ping,name,desc,map,players,maxplayers,botplayers,pass,lastplayed,address,gamemode,workshopid,isanon,version,localization,gmcategory) print("Callback worked") end, CallbackFailed = function (address) print("callback failed") end, Finished = function () print("Finished") end, } serverlist.Query(data)
Output: console will print either the "worked" callback function or the "failed" callback function

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...