Arma 3 Scripting

Command in Multiplayer

getServerInfo

Also available as Markdown and JSON, or read the original wiki page.

Description

Get the current server instance's settings from server config.

Note

Player-hosted (non-dedicated) servers have fewer entries as they do not use a server config file.

Syntax

getServerInfo

Returns: HashMap

Examples

Example 1

private _serverInfo = getServerInfo;

// example result:
/*
[
    ["admins", ["01234", "56789"]],
    ["autoSelectMission", false],
    ["battlEye", false],
    ["disconnectTimeout", 0],
    ["estimateTimeLeft", 15],
    ["forcedDifficulty", "Wolf"],
    ["hasPasswordAdmin", true],
    ["hostname", "Test Server"],
    ["isLocked", false],
    ["maxDesync", 90000],
    ["maxPacketLoss", 2000],
    ["maxPing", 8000],
    ["maxPlayers", 64],
    ["missionHeader", [["fileName", "DbgZeus4P.VR"], ["name", "DbgConsole4PZeus"], ["description", ""], ["fileSize", "7461"], ["steamId", "0"], ["fileCRC", "99816a4"]]],
    ["motd", []],
    ["overrideHazeQuality", 0],
    ["password", ""],
    ["persistent", true],
    ["randomMissionOrder", false],
    ["requiredBuild", 0],
    ["verifySignatures", 0],
    ["zeusCompositionScriptLevel", 2]
]
*/

Example 2

if (!isServer) exitWith {};

if (getServerInfo get "password" != "") then
{
    ["Welcome, I see you had the password ready!"] remoteExec ["hint"];
};

See also

admin · allUsers · estimatedTimeLeft