{"name":"getServerInfo","title":"getServerInfo","type":"command","url":"https://community.bistudio.com/wiki/getServerInfo","revid":373696,"updated":"2025-06-17T13:55:14Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"2.20"},"since":"arma3 2.20","arma3_since":"2.20","locality":{"server_exec":true},"description":"Get the current server instance's settings from server config.\n\n> [!NOTE]\n> Player-hosted (non-dedicated) servers have fewer entries as they do not use a server config file.","syntaxes":[{"syntax":"getServerInfo","params":[],"returns":{"type":"HashMap","type_expr":"HashMap"},"form":"nullary"}],"examples":[{"text":"```sqf\nprivate _serverInfo = getServerInfo;\n\n// example result:\n/*\n[\n    [\"admins\", [\"01234\", \"56789\"]],\n    [\"autoSelectMission\", false],\n    [\"battlEye\", false],\n    [\"disconnectTimeout\", 0],\n    [\"estimateTimeLeft\", 15],\n    [\"forcedDifficulty\", \"Wolf\"],\n    [\"hasPasswordAdmin\", true],\n    [\"hostname\", \"Test Server\"],\n    [\"isLocked\", false],\n    [\"maxDesync\", 90000],\n    [\"maxPacketLoss\", 2000],\n    [\"maxPing\", 8000],\n    [\"maxPlayers\", 64],\n    [\"missionHeader\", [[\"fileName\", \"DbgZeus4P.VR\"], [\"name\", \"DbgConsole4PZeus\"], [\"description\", \"\"], [\"fileSize\", \"7461\"], [\"steamId\", \"0\"], [\"fileCRC\", \"99816a4\"]]],\n    [\"motd\", []],\n    [\"overrideHazeQuality\", 0],\n    [\"password\", \"\"],\n    [\"persistent\", true],\n    [\"randomMissionOrder\", false],\n    [\"requiredBuild\", 0],\n    [\"verifySignatures\", 0],\n    [\"zeusCompositionScriptLevel\", 2]\n]\n*/\n```","code":["private _serverInfo = getServerInfo;\n\n// example result:\n/*\n[\n\t[\"admins\", [\"01234\", \"56789\"]],\n\t[\"autoSelectMission\", false],\n\t[\"battlEye\", false],\n\t[\"disconnectTimeout\", 0],\n\t[\"estimateTimeLeft\", 15],\n\t[\"forcedDifficulty\", \"Wolf\"],\n\t[\"hasPasswordAdmin\", true],\n\t[\"hostname\", \"Test Server\"],\n\t[\"isLocked\", false],\n\t[\"maxDesync\", 90000],\n\t[\"maxPacketLoss\", 2000],\n\t[\"maxPing\", 8000],\n\t[\"maxPlayers\", 64],\n\t[\"missionHeader\", [[\"fileName\", \"DbgZeus4P.VR\"], [\"name\", \"DbgConsole4PZeus\"], [\"description\", \"\"], [\"fileSize\", \"7461\"], [\"steamId\", \"0\"], [\"fileCRC\", \"99816a4\"]]],\n\t[\"motd\", []],\n\t[\"overrideHazeQuality\", 0],\n\t[\"password\", \"\"],\n\t[\"persistent\", true],\n\t[\"randomMissionOrder\", false],\n\t[\"requiredBuild\", 0],\n\t[\"verifySignatures\", 0],\n\t[\"zeusCompositionScriptLevel\", 2]\n]\n*/"]},{"text":"```sqf\nif (!isServer) exitWith {};\n\nif (getServerInfo get \"password\" != \"\") then\n{\n    [\"Welcome, I see you had the password ready!\"] remoteExec [\"hint\"];\n};\n```","code":["if (!isServer) exitWith {};\n\nif (getServerInfo get \"password\" != \"\") then\n{\n\t[\"Welcome, I see you had the password ready!\"] remoteExec [\"hint\"];\n};"]}],"see_also":["admin","allUsers","estimatedTimeLeft"]}