getServerInfo: Difference between revisions

From Bohemia Interactive Community
(Page creation)
 
m (Remove devbranch)
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:
|game1= arma3
|game1= arma3
|version1= 2.20
|version1= 2.20
|branch= dev


|serverExec= server
|serverExec= server
Line 11: Line 9:


|descr= Get the current server instance's settings from {{Link|Arma 3: Server Config File|server config}}.
|descr= Get the current server instance's settings from {{Link|Arma 3: Server Config File|server config}}.
{{Feature|informative|Player-hosted (non-dedicated) servers have fewer entries as they do not use a server config file.}}


|s1= [[getServerInfo]]
|s1= [[getServerInfo]]
Line 22: Line 21:
/*
/*
[
[
["persistent", true],
["admins", ["01234", "56789"]],
["requiredBuild", 0],
["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", []],
["motd", []],
["isLocked", false],
["overrideHazeQuality", 0],
["estimateTimeLeft", 15],
["disconnectTimeout", 0],
["autoSelectMission", false],
["password", ""],
["password", ""],
["maxDesync", 90000],
["persistent", true],
["randomMissionOrder", false],
["randomMissionOrder", false],
["overrideHazeQuality", 0],
["requiredBuild", 0],
["missionHeader", [["fileName", "DbgZeus4P.VR"], ["name", "DbgConsole4PZeus"], ["description", ""], ["fileSize", "7461"], ["steamId", "0"], ["fileCRC", "99816a4"]]],
["hasPasswordAdmin", true],
["forcedDifficulty", "Wolf"],
["verifySignatures", 0],
["verifySignatures", 0],
["maxPlayers", 64],
["zeusCompositionScriptLevel", 2]
["maxPing", 8000],
["zeusCompositionScriptLevel", 2],
["maxPacketLoss", 2000],
["hostname", "Test Server"],
["battlEye", false]
]
]
*/
*/

Latest revision as of 15:55, 17 June 2025

Hover & click on the images for description

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:
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"]; };

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