{"name":"getServerInfo","operator":null,"title":"getServerInfo","type":"command","url":"https://community.bistudio.com/wiki/getServerInfo","revid":373696,"updated":"2025-06-17T13:55:14Z","groups":["Multiplayer"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.20"}],"since":{"game":"arma3","name":"Arma 3","version":"2.20"},"arma3_since":"2.20","branch":null,"locality":{"argument":null,"effect":null,"server_exec":true},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[],"returns":{"type":"HashMap","types":["HashMap"],"description":null,"text":"HashMap"},"form":"nullary","operator":null,"left":null,"right":null}],"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};"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["admin","allUsers","estimatedTimeLeft"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Multiplayer","Introduced with Arma 3 version 2.20","Scripting Commands","Scripting Commands: Server Execution"]}