getServerInfo

From Bohemia Interactive Community
Jump to navigation Jump to search
Hover & click on the images for description
Only available in Development branch(es) until its release with Arma 3 patch v2.20.

Description

Description:
Get the current server instance's settings from server config.
Player-hosted (non-dedicated) servers have fewer entries as they do not use a server config file.
Groups:
Multiplayer

Syntax

Syntax:
getServerInfo
Return Value:
HashMap

Examples

Example 1:
Copy
private _serverInfo = getServerInfo; // example result: /* [ ["persistent", true], ["requiredBuild", 0], ["motd", []], ["isLocked", false], ["estimateTimeLeft", 15], ["disconnectTimeout", 0], ["autoSelectMission", false], ["password", ""], ["maxDesync", 90000], ["randomMissionOrder", false], ["overrideHazeQuality", 0], ["missionHeader", [["fileName", "DbgZeus4P.VR"], ["name", "DbgConsole4PZeus"], ["description", ""], ["fileSize", "7461"], ["steamId", "0"], ["fileCRC", "99816a4"]]], ["hasPasswordAdmin", true], ["forcedDifficulty", "Wolf"], ["verifySignatures", 0], ["maxPlayers", 64], ["maxPing", 8000], ["zeusCompositionScriptLevel", 2], ["maxPacketLoss", 2000], ["hostname", "Test Server"], ["battlEye", false] ] */
Example 2:
Copy
if (!isServer) exitWith {}; if (getServerInfo get "password" != "") then { ["Welcome, I see you had the password ready!"] remoteExec ["hint"]; };

Additional Information

See also:
admin allUsers estimatedTimeLeft

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note